Forum rules - please read before posting.

LANGUAGE

I have a menu, with a text that is connected to a global variable that I define as objective. I have detected this problem, that if the language is in the original, it does not update the variables in that text, but if I change it to Spanish, it updates the variables as you see in the video, if I go back to the original, there is only the variable that I take at that moment, but it is not being updated, every time we put the shovel on the hotspot, through an action list the variable increases by +=1
I leave a sample video where you can see that the variable is increasing but it is not updating in the original language

Apart from this problem, I would like OnVariableChange to be able to detect when the value has changed but only in the Objective global variable, since there is an animation that points to the text so that the user sees what the next mission is.

Comments

  • Before this happens, what I do is give the statement of the following objective by modifying the variable "Objective" through an action list
    Variable
    Set
    new value is:
    Entered Here "You have collected [compvar:194028:0] of 6 clays"

  • What is your AC version, and can you share screenshots of both the text's Label properties in the Menu Manager, and its entry in the Speech Manager (showing both the original and translation)?

    I would like OnVariableChange to be able to detect when the value has changed but only in the Objective global variable

    The ability to run an ActionList when a specific variable is changed will be introduced in v1.78.

  • AC VERSION 1.77.3

  • If I reproduce the action list that contains the Variable set action again, that updates the variable in the menu, to solve the problem I would have to create an action list with a single action that would be the "Variable Set" when the shovel is used on the hotspot and so for all the objectives that include a counter, it would be a somewhat long task but if you do not find an immediate solution I will do that
    Thank you

  • Thanks for the details.

    This occurs because the Variable: Set Action automatically converts token values when it runs - so the text label will remain fixed with the variable's value at the time.

    I will see about making this behaviour optional, but you can temporarily prevent this behaviour by opening AC's ActionVarSet.cs script and commenting out / removing the ConvertTokens function calls on lines 93 and 381.

    The other method would be to set your OBJETIVE variable's type from String to PopUp. With this type, you'd set all the possible values it can take directly in the Variables Manager.

  • Do I have to comment the whole line of code?
    Or some specific part of the code line?

  • Just those lines.

    I will provide this as an option in the upcoming v1.78 update, however.

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.