Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Adam Z on January 24, 2014, 02:59:03 PM

Title: How to activate and deactivate scripts on game objects? [SOLVED]
Post by: Adam Z on January 24, 2014, 02:59:03 PM
I have a first person character and a vehicle with a collider.  Both the player and the vehicle have they own unique controller with key mapping in scripts attached to each. Is there a way to turn on and off various scripts upon entering a collider, similar to the check-box next to the script in the Inspector?  So if I enter the vehicle collider it turns off the first person controller, and turns on the vehicle controller.

Thanks!
Title: Re: How to activate and deactivate scripts on game objects?
Post by: phannDOTde on January 24, 2014, 07:08:03 PM
trigger event to trigger the action and than use enable fsm action to enable or disable a certain script

greets
peter
Title: Re: How to activate and deactivate scripts on game objects?
Post by: Alatriste on January 25, 2014, 04:26:45 AM
Set Property seems to be able to turn on/off components. You might want to give a try.
Title: Re: How to activate and deactivate scripts on game objects?
Post by: jeanfabre on January 27, 2014, 05:05:42 AM
Hi,

 there is an action for this as well: "enable Behavior"

bye,

 Jean
Title: Re: How to activate and deactivate scripts on game objects?
Post by: Adam Z on January 27, 2014, 01:22:02 PM
Perfect, thats what Im looking for. Thanks!