Using Scripts in IF statments (Conditional Branches).
RPG Maker MV SupportConditions retrieve values, they don't set them. At least in Ace, whenever you set a switch, the value returned was ALWAYS true, because setting the switch succeeded.
would be true if the switch was true, and false if the switch was false. The switch number is taken from variable 10.
Code:
Conditional Branch: Script: $gameSwitches.value($gameVariables.value(10))
Is it possible to do the following as a script inside the conditonal branch
If Switch (var10) is off
$gameSwitches.value($gameVariables.value(10), false)
If Switch (var10) is off
$gameSwitches.value($gameVariables.value(10), false)
actually I can make that work by reversing the then and else parts of the statement.
thanks for your help again Shaz.
thanks for your help again Shaz.
You would not do that in a conditional branch. If you wanted to use a script to set a switch, you would use a Script event command (second last command on tab 3)
Original thread: https://forums.rpgmakerweb.com/threads/using-scripts-in-if-statments-conditional-branches.49248/
