playMaker

Author Topic: enable/disable script with Enable Behaviour  (Read 5332 times)

stigma

  • Full Member
  • ***
  • Posts: 176
enable/disable script with Enable Behaviour
« on: February 14, 2015, 11:10:46 AM »
hello,
I want to enable and disable a script. to activate it work but when I leave the area, the script is not disabled. what for?
Thank you for your help


coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: enable/disable script with Enable Behaviour
« Reply #1 on: February 14, 2015, 04:09:30 PM »
And you don't have 2 trigger events that have one parameter On trigger on and the other On trigger exit?
« Last Edit: February 14, 2015, 04:16:03 PM by coffeeANDsoda »

stigma

  • Full Member
  • ***
  • Posts: 176
Re: enable/disable script with Enable Behaviour
« Reply #2 on: February 15, 2015, 09:53:24 AM »
I did with one FSM and it's the same thing

Mirror inspector :
« Last Edit: February 15, 2015, 10:10:14 AM by stigma »

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • AL Games
Re: enable/disable script with Enable Behaviour
« Reply #3 on: February 15, 2015, 10:28:55 AM »
ok , you want to enable/disable script

Can you try this from attachments in this post? And see if working...

Also, instead of using "Wait" action you can change it to "Trigger Event".

stigma

  • Full Member
  • ***
  • Posts: 176
Re: enable/disable script with Enable Behaviour
« Reply #4 on: February 16, 2015, 12:23:49 PM »
it does not work  :(

Edit :
It's ok if the componant is disabled too !
« Last Edit: February 21, 2015, 09:46:02 AM by stigma »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: enable/disable script with Enable Behaviour
« Reply #5 on: August 17, 2015, 02:34:55 PM »
Hi,

 You can reference a disabled component this way.

 instead, you have a to store the Component in a FsmObject Variable, so that even when disabled, you have a pointer to it, then it works.

 so create a FsmObject of the type of your component you want to enable disable, and then use that FsmObject in your Actions in the "component" property

 Bye,

 Jean