I've tried to add a script to a link, but it doesn't work. The goal is, when the player clicks on a link, a variable change : from 1 to 4, 2 to 1, 3 to 2, 4 to 3 (but the player remains on the same page). So i've written that in the script:
IF %VARIABLE1 = 2
THEN %VARIABLE1 := 1
IF %VARIABLE1 = 3
THEN %VARIABLE1 := 2
IF %VARIABLE1 = 4
THEN %VARIABLE1 := 3
IF %VARIABLE1 = 1
THEN %VARIABLE1 := 4
It works… except for "2 to 1"! Instead, the 2 goes to 4.
Why? And how to fix this?