Forum rules - please read before posting.

Issues with setting a String Global Variable

Hi,

I'm trying to use a script to change the value of a Global Variable (type String):

The code gets triggered in the right place, however the Global Variable doesn't get updated. I'm probably doing something wrong but can't spot what.

Thanks,
David

Comments

  • The code looks fine. What's your AC version, and are you playing in the game's default language?

    Try unchecking "Values can be translated?" - does that affect things?

    An alternative way to set the string value:

    GlobalVariables.GetVariable ("LastHotspot").TextValue = hotspot.hotspotName;
    
  • Thanks Chris! That worked.

    Awesome support.

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.