In my game, the herbs/bandages are destroyed when I pick them up. The first herb I placed into the world worked just fine, but the second herb wasn’t destroyed because the destroy actor was referencing the object in the world. Does this mean that I have to make a script for each one I overlap that one gets destroyed when I press z to pick it up? Or is there a workaround blueprint to accomplish this same task instead?
Is there a workaround for destroying multiple objects at different times?
I have different size trigger boxes to do different things. That is why I have multiple trigger boxes. The reason I asked if there was a way to specify it was because the input from the trigger box wouldn’t go into the target.
Blueprints are context sensitive, you’re using a different node than I am. You’re using one for actors not components. Try it like this, always drag a wire first and then search:
If I used that would I have be able to pick up other actors in the scene or could I specify which kinds of actors?
Not have be able to, would I be able to.
I also have multiple trigger boxes in my character to do different things. Is there a way to specify which box overlaps it?
Use inheritance - base class is a pickable item, you can then pick up everything that inherits from it.
- or you can use an interface.
- or you can use tags to filter what you pick up.
- or you can use collision channels to filter.
Sure, why not, I’m using sphere here to pick up herbs. You can use another collision volume to chop trees.
But one is usually enough, why complicate things. Check what you overlap and then decide what to do with it. You may have your reasons to use many overlapping components, of course - a robot with 3 different arms may pick up things in 3 different ways, for example.
I have different size trigger boxes to
do different things. That is why I
have multiple trigger boxes.
You could resize the existing box and save yourself some trouble. Consider it. But that’s up to you, of course. Maybe you need many, not sure what your game is all about.
Thanks! That worked!