YinYin
edited September 2014 in ORK Support
For some reason it's not working. My event is like this this:

image

It's not working though. It only works when I add a fail case. That means I'm setting up my variable check wrong.

How can I debug this? I would like to print the value of the variable that I am checking only during this event.
  • Without seing details of your checks it's only guessing, but I'd say you're using the wrong Variable Origin.

    Local origin is only available during the running event (i.e. the variables are gone once the event ends), and since the check seems to be right after the start node, there's no way a local variable can already be set at this time.

    Where is the Direction variable set?
    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!
  • The Direction variable is set in a script. The other one is set in the event only if it's not set yet.
  • YinYin
    edited September 2014
    Ok, so I changed it to global and here is the updated fork:
    image

    Still not triggering :( The variable is a float.

    Setting the variable like this:

    ORK.Game.Variables.Set("Direction", 0.1f);
    Debug log prints out the correct values.
    Post edited by Yin on
  • Are you setting exactly those values (0.1, 0.2, etc.), or are they somehow calculated?
    The thing with float variables is that even if the log says 0.1, it doesn't mean it's exactly that value, because the console will only display the first decimal of the number.

    Did a quick test with changing the variable in an event and that worked, so either you aren't setting the exact values or the script isn't executing.
    You could also try using one of the range checks (e.g. Range Inclusive from 0.09 to 0.11 instead of Is Equal 0.1) in case the values aren't set to the exact 0.1, 0.2, etc. values :)
    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!
  • Yep, I'm setting them directly to those float values. If they are anything else, my Direction mecanim won't work. So I know they are setting because it is printing and because my directional movement animations work fine.
  • Strange - well, please wait for the next update, there's an Approximately check coming, which uses Mathf.Approximately to check if the values are similar. That should solve the problem :)
    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!
  • Will do! Thanks :D
Sign In or Register to comment.