KnuckleCracker / CW4-bug-tracker

The gathering point for bugs and supporting information, or suggestions about additional features.
Creative Commons Attribution Share Alike 4.0 International
13 stars 2 forks source link

Add switch/case support #1060

Closed knucracker closed 1 year ago

knucracker commented 1 year ago

'If else if else if endif endif endif'... needs some better way that doesn't involve keeping count of N endif commands. Adding a switch with cases would help create a cleaner syntax

knucracker commented 1 year ago

Added in 2.4.4. Support for this syntax: ` switch case(<-currentState 0 ==) @HandleIdle endcase

case(<-currentState 1 ==) 
    @HandleMove
endcase

case(<-currentState 2 ==) 
    @HandleFire
endcase

endswitch `