Using Keyboard to Delete an Brush?

I have encountered an issue with using a key on the keyboard to trigger an event in a brush. I need it to update a variable in the FirstPersonCharacter then delete itself. The key I was using for testing was ‘E’ anyway this is still possible?

Hi, may you explain more specifically what you want to achieve?

Sorry typo, A Brush

I guess you need an actor (with static mesh component) instead of brush. You can get player character then cast to your specific class (use search to find out that), this allows you to set character variable. In the end of your script, destroy actor.

Just pretending that I’m right, because if you refer to the texture brush, you can’t do stuff)

Thanks I will try that

When the key ‘E’ is pressed I want it to delete itself and update the variable ‘Ammo’, I understand the cast to FirstPersonCharacter, but I can’t figure out the key

You are welcome!

yeah. i think this has much sense

Perfect!

Please mark answer as accepted for searching purpose.

136547-accept.png