| QUOTE (Michael-Knight1 @ Wednesday, Sep 19 2012, 14:33) |
| Compile This Script With Sanny Builder ... |
Don't do that. As all the scripts from Michael-Knight1, it's wrong and in this case the badly made loop will crash your game (not sure if it even compiles).
Proper version using the same keypress as broken MK1's version:
| CODE |
{$CLEO} 0000: INFRUN
while true 0001: wait 0 ms if 0256: player 0 defined then if 0AB0: key_pressed 51 then if 0039: 0@ == 0 then 0006: 0@ = 1 else 0006: 0@ = 0 end 0330: set_player 0 infinite_run 0@ while 0AB0: key_pressed 51 0001: wait 0 ms end end end end
|
Edit:
As you actually request a
CLEO4 version (my first version works on both CLEO3 and CLEO4) you might want to use thiis version (requires CLEO4 WITH IntOperations.cleo) to reduce a file size:
| CODE |
{$CLEO} 0000: INFRUN
while true 0001: wait 0 ms if 0256: player 0 defined then if 0AB0: key_pressed 51 then 0B12: 0@ = 0@ XOR 1 0330: set_player 0 infinite_run 0@ while 0AB0: key_pressed 51 0001: wait 0 ms end end end end
|
This post has been edited by SilentPL on Wednesday, Sep 19 2012, 13:11