I'm trying to change the value of a variable inside the movement route of an event.
I looked around and found this code:
$gameVariables.setValue(x, $gameVariables.value(x) = [value])
With 'x' being the number of the variable, without the added 0's in front of it.
This seems to work, except that that this same event should be deleted afterwards, and the next event page should be triggered to erase the event.
So right now I have this:
(in the movement route of page 1 of the event)
$gameVariables.setValue(97, $gameVariables.value(97) = 5)
This should set the value of Variable 97 to 5.
Page 3 of the event triggers on Variable 97 = 5... and should immediately delete the event.
Except this does not happen. The event is stil there as if it is playing normally.
Do I have to add another '=' to that line, like so?:
$gameVariables.setValue(97, $gameVariables.value(97) == 5)
I looked around and found this code:
$gameVariables.setValue(x, $gameVariables.value(x) = [value])
With 'x' being the number of the variable, without the added 0's in front of it.
This seems to work, except that that this same event should be deleted afterwards, and the next event page should be triggered to erase the event.
So right now I have this:
(in the movement route of page 1 of the event)
$gameVariables.setValue(97, $gameVariables.value(97) = 5)
This should set the value of Variable 97 to 5.
Page 3 of the event triggers on Variable 97 = 5... and should immediately delete the event.
Except this does not happen. The event is stil there as if it is playing normally.
Do I have to add another '=' to that line, like so?:
$gameVariables.setValue(97, $gameVariables.value(97) == 5)