Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: henk on July 25, 2011, 02:24:28 PM

Title: Activate Game Object
Post by: henk on July 25, 2011, 02:24:28 PM
I'm using the "Activate Game Object" action script - it works... I'm able to de-activate an object and all of its children. The problem is that I can't seem to re-activate the game object after I've deactivated it.

Here's what I've tried:
Adding a wait for one second action and checking the "Reset On Exit" checkbox on the "Activate Game Object" action.

I've also tried:
A transition, on FINISH, to a new state that has the "Activate Game Object" action with the "Active" box checked.

Neither of these work.

Any Ideas?

Thanks,
Henk
Title: Re: Activate Game Object
Post by: Proton on July 25, 2011, 04:32:40 PM
Are you deactivating the GO that your FSM is attached to? That would stop it from working.
Title: Re: Activate Game Object
Post by: justifun on July 25, 2011, 05:19:28 PM
Yeah try putting the "activate game object" on another object other than the one you want to activate/deactivate, and then use the "specify game object" drop down to flag the object you want.

Title: Re: Activate Game Object
Post by: LordShaggy on July 26, 2011, 02:45:20 PM
I would suggest creating a game object that stores all the things you need to have deactivated. Parent the game object you need to deactivate to this object, then deactivate it. 

When you need to reactivate it, do it from the object that you parented it too.   You can then just have a set of states run on activate to ensure it is parented to the right thing.

If this is confusing, in short.

"You will have to activate the object through something else.  Once it is deactivated, nothing inside those objects will work or run."
Title: Re: Activate Game Object
Post by: henk on July 28, 2011, 07:29:22 PM
Thanks for the help! It worked.  :)