Forum rules - please read before posting.

Linking popup values

I am trying to do something that feels like it should be possible, but I'm unclear on how to do it. I would like to have multiple popup variables that pull from the same set of values. In other words, suppose I have a list of all available characters in the game, and I would like to have different variables, that represent different things, that each have a different character as its value. As an example, let's say I had this list of characters:

  • Bob
  • Frank
  • Suzy
  • Ed

And I wanted to have different popup variables that referenced those values, such as:

  • FirstSeen = Bob
  • LastSeen = Suzy
  • Favorite = Suzy
  • LeastFavorite = Ed

Is it possible that I can setup multiple popup variables that pull from the same set of values? I don't want to have to add a new value to each of those variables each time I add one, and I really need to be able to reference that same list within code.

Thank you for your help!

Comments

  • Welcome to the community, @danfrias.

    PopUp values are independent - you can't share the labels with another automatically. Through coding, however, you could have a simple script that updates the labels from a "base" PopUp:

    private void UpdatePopUpLabels (int toVarID, int fromVarID)
    {
        GVar fromVar = KickStarter.variablesManager.GetVariable (fromVarID);
        GVar toVar = KickStarter.variablesManager.GetVariable (toVarID);
        toVar.popUps = fromVar.popUps;
    }
    

    Except when you're looking to display a PopUp in a Menu, they are chiefly a convenience tool. A PopUp variable's value is still a simple integer, index-linked to a string array. If you're going down the coding route, you could leave your variables as integers, and have a custom script to convert them into a string based on a shared array.

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.