Forum rules - please read before posting.

Increase By for Custom Script?

Hello,

I'm handling a custom script, and I know you can use "AC.GlobalVariables.SetFloatValue". However, I need to give 'points' through my custom script, or increase the value of the current set of points the player has already. Any simple way to do this?

Thank you.

Comments

  • Sure, just get the value first:

    int myVarID = 1; // Or whatever
    float points = AC.GlobalVariables.GetFloatValue (myVarID);
    points += 2; // Or whatever
    AC.GlobalVariables.SetFloatValue (myVarID, points);

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.