How can I check if an objective_device still exists?

Guards can pick-axe the objective_device and the DestroyedEvent seems to only accept agents and doesn’t seem to fire when guards destroy it.

Btw, I have the objective_device’s DestroyedEvent tied into the Activate function of the end_game_device logic without using any verse code. I noticed that the game didn’t end when the guards killed it.

How can I detect if the objective_device is destroyed? I don’t mind using verse code. I was thinking is it as easy as creating an editable reference and doing an if check on it somehow?

Guards are agent so the event should trigger, I guess it’s a bug then.

Though, did you try to retrieve the GetTransform() of the objective_device after being destroyed ?

ahh interesting, right.

let me give that transform thing a try.

1 Like

If it crashes your map don’t panic :slight_smile:

No crashes, it seems to give the same transform translation as it did before the guards destroyed it.

I have a weird workaround where I attach a prop, using the Parent Actor to Attach To, to the objective device. When the objective device is gone the child is destroyed too. Then I poll the prop using not IsValid and when it is true, then I can tell the objective device was destroyed.

I get the feeling there is something simpler.

1 Like