Here another example where the Player transforms into a Dragon aslong he is holding the OK Button.
Wrong:
Better:
Conditions drain no performance in comparison to the execution of the Change Actor Graphic Command.
Wrong:
Code:
◆If:Button [OK] is pressed down
◆Change Actor Images:Harold, Actor1(0), Nature(6), Actor1_1
◆
:Else
◆Change Actor Images:Harold, Actor1(0), Actor1(0), Actor1_1
◆
:End
Better:
Code:
◆If:Button [OK] is pressed down
◆If:Self Switch A is OFF
◆Control Self Switch:A = ON
◆Change Actor Images:Harold, Actor1(0), Nature(6), Actor1_1
◆
:End
◆
:Else
◆If:Self Switch A is ON
◆Control Self Switch:A = OFF
◆Change Actor Images:Harold, Actor1(0), Actor1(0), Actor1_1
◆
:End
◆
:End