Forum rules - please read before posting.

popup variable useage

I have a Menu with Label and Number. In the number the player enters 1 through 6. I want to use the popup variable so that an action list is done depending on the number entered. I first convert the string from Number into an int variable (Set formula) and how can I tell the porpup variable which number to execute?

Comments

  • Use the Variable: Copy Action to copy it from the Int to the PopUp variable.  Currently the Action won't copy to a PopUp variable, but you can fix that by opening ActionVarCopy.cs and changing line 98:

    if (newVar.type == VariableType.Integer || newVar.type == VariableType.Boolean)

    to:

    if (newVar.type == VariableType.Integer || newVar.type == VariableType.Boolean || newVar.type == VariableType.PopUp)

    I'll make the change official in v1.51.  You can then use the Variable: Pop Up Switch Action to do different things according to it's value.
  • Yes, it works Thanks




  • edited June 2017
    Does ActionVarCopy.cs still need editing in v.1.5.7 for Variable:Copy to work? If so which line? Line 98 currently points at totally different code and using it as described here still returns the error: "Cannot compare PunchScore and PunchScore Max as they are not the same type!"

    Here's the relevant actionList:

    image
  • @DADA_universe: That message is comping from the Variable: Check Action - not Variable: Copy.  In order to compare the values of two variables that are not the same type, you have to copy one of them to a tempoary one that is the same type.
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.