Hi, so I’m working on a game prototype and I kinda need help on how to remove an item my character is holding. For exemple, in my scene , I will add a ‘zone’ that when my character is in with the object the object will be removed. Any idea on how to do it? i’ts a third person game ! Thanks
Hey ,
The way you’d want to achieve this is by creating an event based on trigger volume. So Item X is picked up by Player 1, who then carries Item X to a gate, which needs to be opened. By having Item X in Player 1’s hands creates an event that triggers the gate to open, and then the item will be destroyed.
Here is a sample blueprint that I created to simply pick up an item, walk over to the trigger volume area and then it’s deleted. I included print strings merely for my benefit, to ensure it was working.
Hopefully this helps you with what you’re trying to do within your project. If you happen to have any further questions, please feel free to comment back. Keep in mind that there is ample documentation within the [Unreal Engine site][2]. This specific [tutorial][3] should be enough to help guide you through using trigger volumes as well.
Cheers!
waow thanks very much! But what i want is just to bring the item in a spot on the map that will destroy it (then give point but later on) does your BP still work for that?
Hey ,
The blueprint example I provided you is for an item being picked up from one section on the level and then walked over to the area where the trigger volume is. Once I’m in the trigger volume area with the item, my print string says ‘Dropped Off’ and then the item is no longer with you and is destroyed. Once it’s destroyed and you walk into the trigger volume again, it’ll say ‘Nothing in hands’.
When you’re in doubt with blueprints, it’s best to add in print strings so you know it’s working. There may be some tweaking needed in my blueprint I provided to you in order to achieve the goal that you’re looking for, but that’s a great start.
Looking forward to hearing from you!
Thanks for the help here what i did for the grab mechanic : the first BP is in my ball eevnt graph and second in MaingameMode, the only thing It doesnt work as i want is the ball follow my character instead of juste beeing in front of him, like hes holding it (withouth the animation). So using your BP, my item can be destroyed when i enter the zone? Like i need to bring the ball to a specifig place ( I guess i’ll need a BP for that) then when it enter the ball just get destroyed, see it as you get a flag to your base and give point. alt text
I will test your two BP when i’m done with school maybe it’s work the way I want ill give you some update after, thanks again! (its look so much simple that the way i did)
Hey ,
If you’re using a blueprint based on my example I provided you, then yes the ball will disappear once you enter the trigger volume area. It’s because I set the ball up to be destroyed once entering the area of the trigger volume.
Now, if you want your character to actually hold the item in their hands, you’ll have to do some more work on your character. That gets a little bit into the animation mode, which is not my specialized area however, I’ve found some information that may be of use.
- [AnswerHub: Holding Items][1]
- [Unreal Engine: Video Tutorials][2]
- [ Video: Attaching to Sockets][3]
I hope this information helps!
Animation for certain Items (holding items etc.) - Character & Animation - Epic Developer Community Forums
[2]: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
[3]: https://www./watch?v=-xOoknUDGaE
You’re welcome, good luck with your project!
Yes it does help very well, but the animation part is for my other partner, just a way that the ball is stick to the character would work ! but Thanks Vmuch
Was wondering… where your SM_tableroudn and sphere node come from? i cant find them and the node after the get player character… sorry
edit : if im in maingamemode does it change thing?
Hey,
I pulled the SM_TableRound from the World Outliner. I dragged it over to the blueprint and dropped it.
Cheers!
I never knew World outliner exist lol, but What did you drag? Probably because I dont have the same name as yours but I cant drag anything!
because i guess I need my sphere (named urbas in my prototype) and the tableRound, but cant find it, and cant drag anything in my event graph in MaingameMode
here what i did so far… I think i got your sphere node? (Urbas is the name of the ball) but i cant find 2 node, the TableRound and the one with the target+mesh
Hey ,
Here is where I located the StaticMeshActors:
You can simply drag that over into the blueprint editor and it’ll appear in your screen.
Keep in mind that you may not actually have an additional item to include. My scene has 2 items being picked up, a table and a sphere. Depending on how your scene is set up, you may have 1 item or 100 items. So do not worry about not seeing my additional scene. I included multiple items to make sure they would both disappear appropriately.
I hope this helps!
Thanks! Does it change something if my Blueprint are in MaingameMode?
I’ll check it out later today but i think i never saw a TableRound… maybe because im in a different map than then sample? And yea for my sphere they spawn at spawnpoint every X second so they are many
Hey ,
You will not see the same actors as I do because we are not working within the same project. I simply created a template with starter content, just so I’d have more to work with.
My set-up was placed in the blueprint level. If you’re not quite sure where that is, simply press on the drop-down arrow beside blueprints and select “Open Level Blueprint”.
Good luck!