playMaker

Author Topic: How do you check/read a javascript variable?  (Read 1226 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
How do you check/read a javascript variable?
« on: December 18, 2015, 02:52:15 AM »
So I have a variable being set in javascript "CoinsHas.coinsLeft".  The player must have enough coins to play the game.  Otherwise, he must watch a video to get coins.  When he doesn't have any coins left, the button to play is inactive.  The button is shown, but he can not use it.  When I use the joystick with playmaker, I bypass this because I am not checking to see if "CoinsHas.coinsLeft" <0.  the joystick is being controlled by playmaker.  So I need to check what the value is from playmaker so I can decide if to allow the person to use the button.

So I was wondering how do I see what the value of this JavaScript Integer from playmaker?  Also, just so I know, how do you change the value from playmaker as well?

I've tried set property but can't find where the script part is.
here is setup for javascript variable so it does not show up in inspector.
public static int coinsLeft = 0;
« Last Edit: December 18, 2015, 03:07:52 AM by wheretheidivides »