Forum Discussion
Reset variable to default
Is there really no way to reset a variable to default value?
I'm using a variable with a certain text as default value.
By trigger, I change the variable to another with another default value, but there is no way to change the first default value back.........
Is it really so?
17 Replies
- PhilMayorSuper Hero
Add another trigger to reset it.
- PärBrinkCommunity Member
How is that done?
I have a variable called "text" with a default value.
I have a trigger that adjusts that variable to "text_en" that has some other text as default value.
In my efforts to reset the variable text, I've tried "adjust variable"
Variable: text
Operator= Assignment
Value: variable, text
It does not reset the variable text to its default value.- PhilMayorSuper Hero
What is the default value?
Adjust variable assignment, value (your default value, if it was blank then set to blank.
- PärBrinkCommunity Member
My default value was a swedish text.
The variable "text_en" is the same text in english, but once the variable has been set to "text_en", it remains set.......
There must be a way to reset it!
If not, this would be a feature request. - PhilMayorSuper Hero
You just use a trigger to reset it. What it the initial value of the variable is it blank?
- PärBrinkCommunity Member
Nope.
It is a text. - PärBrinkCommunity Member
Yes.
Typing the value directly into the trigger works for me too.
Using variables as values do not.
This really should be a no brainer, but........If I have a blank variable for the presented text and then have the english and swedish texts as separate variables, it works just fine.
But why do I need 3 variables instead of just beeing able to reset the initial value of a variable??
- PhilMayorSuper Hero
If you are trying to reset that value on one using another variable then you must have an error in your triggers
Looking at your screenshot (Swedish) you are setting the value of text to the value of text which is a circular that will not change anything
- PärBrinkCommunity Member
Exactly my problem Phil! :-)
I have'nt been able to find a reasonable way to reset the default value in any way using triggers.
Is the answer to this having a "placeholder variable" and the deafult value as a separate variable?
It would increase the variables needed and complexity quite a bit....
Again, Is there really no way to reset a varable to its default value?
Forgot to thank you earlier for helping out Phil! - PhilMayorSuper Hero
There is no way to reset to default value, you can only change to a value or a variable value.
You can either have do it like I have with the typed in value, or you will need a Swedish and English variable to hold the values for each slide which will not be idea.
Other ways you can do it is to change state of a text box instead or swap slides so you have an English and Swedish version, all of them are a reasonable amount of work to get what you want.
Related Content
- 2 months ago
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago