playMaker

Author Topic: Get Bool from Java Script [SOLVED]  (Read 1922 times)

MarkD

  • Full Member
  • ***
  • Posts: 113
Get Bool from Java Script [SOLVED]
« on: May 01, 2014, 10:37:55 AM »
I'm trying to get a bool from an attached java script on my game object.

Any suggestions on how to do that?  I'm not the best scripter (exactly why I'm using Playmaker) so explaining it like I'm a golden retriever would be helpful. :)

Here's the script I'd like to reference.  I'd like my FSM to get when effectActive== true.



private var effectActive = false;

function Update ()
{
   if (effectActive == true)
   {
      
   }
}

function EquipmentEffectToggle (effectIs : boolean)
{
   if (effectIs == true)
   {
      effectActive = true;
      
      Debug.LogWarning;
      
      
   }
   else
   {
      effectActive = false;      
      
   }
}
« Last Edit: May 03, 2014, 02:27:33 AM by MarkD »

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 70
  • Creating CarbonDiOxide
    • Evisystems
Re: Get Bool from Java Script
« Reply #1 on: May 01, 2014, 11:30:40 AM »

Personally when i need to transfer messages between scripts and playMaker
I use global variables.

Like this

PlayMaker -> Global var -> Script

and backwards aswell.

If you can translate from C# to Java then my short tut might be helpfull


MarkD

  • Full Member
  • ***
  • Posts: 113
Re: Get Bool from Java Script [SOLVED]
« Reply #2 on: May 03, 2014, 02:27:04 AM »
Thank you!  This was a huge help!