Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bobbers on June 13, 2015, 11:38:02 PM

Title: Trigger still active after object is destroyed in it. [SOLVED]
Post by: bobbers on June 13, 2015, 11:38:02 PM
Hello, I have been stuck on this for sometime now, and it's probably due to my newness to this sorta thing in general.  I have an object that falls into a trigger area occasionally, it does what it's suppose to and activates just fine and deactivates the trigger when it rolls out which is great.  In some cases though, the object will be destroyed by bombs and the trigger will still be active if destroyed in the trigger box. I get that since it doesn't leave the trigger area it has no way of understanding it's not there anymore my only question is, how to I setup the object itself or the trigger to see that it is indeed gone? Thanks in advance for any help on this.
Title: Re: Trigger still active after object is destroyed in it.
Post by: bobbers on June 15, 2015, 08:56:30 PM
Small update to this, tried instead of destroying the object, hiding it instead when the blast hits in hopes it would still detect the object flying out and no luck on that, same effect.
Title: Re: Trigger still active after object is destroyed in it.
Post by: djaydino on June 16, 2015, 05:43:47 AM
not sure if this is the good way to go but try this :

on the state with "on trigger exit" add a bool true.

then make a global bool (name it ObjDestroyed or something)

then on the destroyed trigger box let is set that bool to true.

on the next state with "on trigger exit" set bool back to false

don't forget to set every frame :)

Greetings,

Dino
Title: Re: Trigger still active after object is destroyed in it.
Post by: bobbers on June 16, 2015, 09:49:20 PM
This is fantastic, thank you! worked beautifully =)
Title: Re: Trigger still active after object is destroyed in it.
Post by: djaydino on June 17, 2015, 05:41:33 AM
Great to hear that!

Can you please add [SOLVED] to your topic :)