I found a video tutorial on how to spawn things. It’s just that it all added in an E key interaction. It’s just I don’t know how to add that the BP that already picks up items that I don’t spawn in. So here’s my question. Can I put the E key in another PB that would work from the video? that won’t error out the one in my 1st char PB. The issue with these tutorials is that they are not project related. They do tutorials on new projects. This is an issue for beginners. The video tutorial is below.
What are you trying to do?
Spawn random objects on level load?
Make your character drop items?
Spawn items in specific locations during runtime?
I agree there needs to be more information given. For just spawning items there’s hundreds of ways to approach it.
Needs determine design.
- Is the spawner a one time usage actor, meaning it only spawns things once, then destroys itself.
- Is it collision based, meaning your character needs to be in proximity (overlap) in order to spawn something, or do all things spawn on map load?
- Will it spawn more than one thing?
- Will items spawned be randomly chosen, list based, random from selected list etc?
- Will the item(s) spawn exactly at spawner location, or do you want/need random rotation and location with in an area?
- Do you need to limit how many of X item can spawn? e.g. there can only be 100 of X ever spawned per round, while Y can have 500.
- Does the spawner need functionality to not spawn something? Say a chance that it spawns nothing.
- Will items spawned be map/level exclusive?
- Will the server be the spawn authority?
ok, I need to try and remember that I can’t all ways explain in detail so that you guys can understand me. Let me try again.
In the video there’s a part for the interaction to pick up the item you spawn in. Ok, with me so far.
The key used is the E Key. I already use that key for picking up non spawning items and add them to the inventory. can I use the E Key
is another PB other than the 1st person char. This is no other way for me to explain this. Generally, it’s about using more than one E Key in gameplay.
If you are trying to drop something (ie spawn it) then you can use another Key input (like any letter on the keyboard).
If you want something to spawn the item (like a crate) then you can trigger the spawning when it takes damage (AnyDamage for example).
The tutorial is simply showing how things are spawned. It is meant to be generic.
It would help us help you if you could answer some of the questions being asked. We can’t read minds.
If you want the ability to pickup and drop items using the same E Key, you need to work with some sort of check/Branch.
For example set a bool to “isNextToItem” and on the item overlap cast to character and set the bool to TRUE. End Overlap FALSE
When you press the E Key, check to see if the BOOL is TRUE, if TRUE pickup the item
If not true, drop an item.
I think I understand you… I might be wrong.
I can’t answer most of those questions because I don’t know. I’m not worried about spawning anything. It’s using the E key more then one time in the project.
No, You’re on the right track, In my PB when I pick up an item it puts it in the player’s inventory, and then it destroys the actor. I use the E key for this. In the video, you will see the same thing. Just one difference. He doesn’t add to the inventory. he just destroys the actor. I wish I could give you a screenshot, It is a long one. I won’t be able to get all of it on the screen. These’s a PB called Base. I’ll try and add to that PB and see if that works. I don’t really know. I have never done that before.
It’s really difficult to get what you are trying to say but to the extent i understood is that you are using or want to use the ‘E’ Key to do more than one thing right?
yeah you can do that and not worry about any sort of functionality being overridden it all depends on the context, so what you can do is once ‘E’ is pressed you need to know on which context it was pressed?
like if the player is standing in front of door and presses ‘E’ it should Open the door instead of spawning actors. you can achieve this multiple ways either by using switch on Enum, simple If-else (branches).
With Programming, its all about KNOWING what you want to happen. Without that Idea, then what will you program?
Think of what you want to create and try to figure out how to implement it.
Yes, I know. My idea didn’t work. I have to use the 1st person char. from that video. So I guess I’ll spawn in other things that you don’t pick up. I think I’m going to have the same issue. If I spawn in Resource nodes. Like Iron, Copper, and so on. I still need to interact with it. Like to be able to do it by hand. The video on the inventory from Mark with the unreal engine. Just left out too much when he made the videos. I might have to start a new project and find a tutorial that does it all. Drag and Drop. Equipment Handling. Hotbar, Player inventory. So this forum is closed. Not much I can do.