playMaker

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

stigma

  • Full Member
  • ***
  • Posts: 106
    • View Profile
enable/disable script with Enable Behaviour
« on: February 14, 2015, 09: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
    • View Profile
Re: enable/disable script with Enable Behaviour
« Reply #1 on: February 14, 2015, 02: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, 02:16:03 PM by coffeeANDsoda »

stigma

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

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

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • View Profile
    • AL Games
Re: enable/disable script with Enable Behaviour
« Reply #3 on: February 15, 2015, 08: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: 106
    • View Profile
Re: enable/disable script with Enable Behaviour
« Reply #4 on: February 16, 2015, 10:23:49 AM »
it does not work  :(

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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15050
  • Official Playmaker Support
    • View Profile
Re: enable/disable script with Enable Behaviour
« Reply #5 on: August 17, 2015, 11:34:55 AM »
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