exiting animation loop

Blitz3D Forums/Blitz3D Programming/exiting animation loop

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You're using lots of separate and/or nested If statements for checking key presses. I'd actually use one overarching If statement with lots of ElseIf for checking key presses. Pseudocode:

If KeyDown(1)
(handle walking)
ElseIf KeyDown(2)
(handle running)
ElseIf KeyDown(3)
(handle turning)
Else
(idle)
EndIf