Remove actor on button click

I have a widget button that’s cast to viewport when overlapping an object. When the button is pushed I want to destroy the object does anyone know how to do that?

2 Likes

hi,
if you have the overlap event in place there should be other actor as slot… add a DelayUntilNextTick node and DestroyActor…

then you should not get an infinite loop error…

hope this helps :slight_smile:

cheers :vulcan_salute:

2 Likes

The delay didn’t work when I overlapped the object it disappeared. I’ll give you context if that could help I’m working on a chest that the player can spend coins on when the character walks up to it the character is asked if the want to open it they can either open it or walk away.

2 Likes

hi,
ok i will make a example later… atm i need to write a review… back soon :slight_smile:

1 Like

hi,
took a while but so you mean something like that ?

i made a widget component to the chest and if it opens one time, the widget and sphere collider get deleted :slight_smile:




hope this helps you :slight_smile:

cheers :vulcan_salute:

1 Like

Hi! im tryn to dissect how this works adn implement it in something im working on. I want to hover the mouse on an object and it give me buttons on what to do with them. I tried following your code but i cant seem to get the button to show up. Any help would b appreciated