Using a trigger box

Hi :slight_smile: so its probably a easy task but for me its not really :v… I just need to make that when I enter a trigger box my ball that my character is holding will be deleted, I know I need to use ‘begin overlap’ but… thats kind of all! I dont really know where and how to do it ;o

the ball is a different actor with a different blueprint, and the character pick a bal on the scene and i need to destroy it when i get on the box, so its different right?

ok and with your solution its will destry only the ball my character is holding? sorry im new and im still trying to understand the first solution ;p

If the ball is a separate actor from the player, take the actor output from the overlap, use Get Class, match that aginast a Class = Class node, and use that resulting boolean in a Branch. If True, go to a Destroy Actor node and use the overlap actor output as the input for that.

If it’s a component of the character, you can use the overlap actor output to cast to the character and set the visibility of the ball component to hidden.

The first solution I mentioned should work just fine.:slight_smile:

Essentially you are making sure the overlapping actor in question is actually a ball, then destroying it using Destroy Actor.

Yep! Overlap handles the specific instance that is overlapping it. By plugging that actor output from the overlap into the target of the Destroy Actor node, you are telling it to destroy the specific ball that overlapped the box

If the trigger has its own BP, do it there. Otherwise, if it’s just a plain trigger volume, do it in the level BP.

And yes :slight_smile:

If it fails I’ll make sure we get it working don’t you fret Olimar

ok! and this blueprint I should create it in the trigger box one? and when you say the actor output from, its the blue ‘other actor’ ?

yes it has it own ;p ok thanks ill try to do what you said… I will probably fail it but well see X) thankss

here what i Did so far : ( i got lost atafter the destroy actor (Urbas is the name of my ball) If needed i can show you the blueprint that grab the ball (but its simple )

Replace that cast to class node with a Class = Class node. You can type in “class =” and it should come up. In that new node, choose your ball class in the dropdown. Now you are comparing the overlapping actor class with your ball class. Take the red boolean output from that and plug it into the Condition pin on your Branch.

And then of course make sure your overlap execution pin (white pin) is plugged into the Branch.

Finally, take the Other Actor pin from your overlap and plug it into Target on the Destroy Actor node.

It should work after that :slight_smile:

Thanks very much! but i think i got it all right except the ball calss in the dropdown? I didnt really understand but here what i got so far

but i feel we are almost there!

by dropdown you mean the ‘selec class’ ? in the == node? sorry im french :v

yea i cant find what you mean by dropdown :frowning:

That’s literally the last step so we are definitely almost there!

Click that dropdown and select the class of your ball actor. So that’ll just be the name of the ball BP

Yes, the select class option in the class == node

Can you show me a picture of the ball BP, making sure it includes the name of it?

yea i put Urbas ( that the name of the ball !) and… nothing happens :(!