Forum rules - please read before posting.

Changing hotspot labels between scenes

Hi, I'm pretty new to Adventure Creator so there's probably an obvious answer to this but so far I can't crack it.

I have a Hotspot that I'm using as a transition between two scenes. When you first hover over it says "East" because it's an unexplored area but once you've clicked it, gone to the next scene and come back, I want the hover text to be "Street" instead.

I've managed to make a hotspot label change using the 'Hotspot: Rename' action within a scene but can't work out how to make it change after the player visits another one. I've tried making a variable and having it change when you leave the scene (i.e. VisitedStreet = True) and then adding a variable check with a 'Hotspot: Rename' to the starting cutscene in the first scene but it doesn't seem to work!

If anyone's got any advice I'd really appreciate it.

Comments

  • Welcome to the community, @doug_funnie.

    If you use Hotspot: Rename, you will have to do so in the scene that the Hotspot is in. This needn't be called every time that the scene is opened, however, if you attach a Remember Hotspot component to it. This component saves changes made to the Hotspot at runtime - including its name.

    There's a few potential ways you can go about this kind of situation, depending on what suits your intended workflow/gameplay logic:

    1. Update the Hotspot's name inside its own Interaction that transitions to the other scene, so that it's already changed by the time you return to the original scene.
    2. Rather than checking a variable, have your OnStart cutscene run a Scene: Check Action to see if you've entered from the Street scene. Again: if you make use of a Remember Hotspot component, this change will be saved so the name will still be updated if you enter from a different scene later on.
    3. Use a variable token in place of the Hotspot's name. If you set a Hotspot's label to be of the format [var:X], then it'll be replaced by the global variable with an ID of X. Updating the Hotspot's name would then be a case of using the Variable: Set Action to update the linked variable, which could either be a String or a PopUp type.
  • Aha perfect, that's solved it. I haven't learnt much about components yet so didn't think to look in there but definitely a lot simpler than all the stuff I was trying. Thanks for the quick reply Chris!

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.