edited July 2018 in ORK Scripting
Hi All,

As per the discussion title, I am trying to change/set some Global ORK Framework variables from a State Machine Behaviour Script but have not managed to get it working.

The following C# Script is an example of what I am trying to do:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ORKFramework;
using ORKFramework.Behaviours;

public class Flying : StateMachineBehaviour


override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
ORK.Game.Variables.Set ("Flying", true);
ORK.Game.Variables.Check ("Flying", true);

Debug.Log ("Flying");

Basically I just want to set a Global Variable called "Flying" to true when the Fly State of the animator is entered.

Any suggestions and or advice regarding this would be greatly appreciated.

Many thanks!
Post edited by gamingislove on
  • Is the function performed, i.e. are you getting the debug output in the console?
    Your variable code looks correct.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.