edited November 2014 in ORK Scripting
Never mind, I misunderstood the Variable Type selection. If you select "Game Variable", then the (string) value of the entered game variable will be used to find the game variable you want to change. I thought I could just enter the name of the game variable I want to change. I can't delete this post, so I'll just leave it here.

The original post:
So in my script I set a game variable with ORK.Game.Variables.Set ("score", 5);
The game variable "score" is also added in the ORK editor. If I get the variable via script (ie. ORK.Game.Variables.GetFloat("score);), it returns 5.
However, when I check its value in Ork Events (see below), the check keeps on failing. It only works when I change the variable's value via Ork, not in my scripts. Am I missing something?

PS The check variable event step has the following settings:
Variable Origin: global
Variable Type: game variable, Value: score
Is Valid: checked, Type: float, Check Type: not equal
Value Type: value, Value: 0
Post edited by 9gate on
  • I got this problem to, I set variable in script then use in event (create the event in editor ), Run time can not get the value in event.
  • My case like @9gate descript.
  • Yeah, that's a common mistake - I probably need to find a better wording for the selections/help texts :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.