Forum rules - please read before posting.

Possible to pass a Component Variable to a Global Variable?

I'm working out the best system to have an integer displayed on screen, depending on which sprite I clikc on. Each sprite has its own Interger Variable Component value, Can this be passed to a global variable to display on screen?


  • Yes, you can use the Variable: Copy Action for that.

    Component variable values can also be read through script, i.e.:

    Variables variablesComponent = GetComponent <Variables>();
    int intValue = variablesComponent.GetVariable ("MyInteger").IntegerValue;
  • Thanks for this.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.