# Expected vars: # ANIM_NS (str), e.g. "hexroller_", "" # RGRAPH_NS (str), e.g. "hexrollerspider_", "" # R0, R1, R4, R5 (str), e.g. "", "_R1", ..., "_R5" state $SUFFIX R0 $PREFIX ANIM_NS "stand": rgraph: $SUFFIX R0 $PREFIX RGRAPH_NS "hexroller" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . $IF INERT: if() then: set myvar("f"): F continue if: expr: > myvar("speed") 0 then: dec myvar("speed") set myvar("f"): T continue $IF !INERT: if() then: set myvar("u"): F set myvar("d"): F set myvar("f"): F set myvar("b"): F if: key: wasdown u then: set myvar("u"): T if: key: wasdown d then: set myvar("d"): T if: key: wasdown f then: set myvar("f"): T if: key: wasdown b then: set myvar("b"): T continue if: expr: myvar("u") not: expr: myvar("b") expr: myvar("f") coll: any yes ;; + ;; ;; . ;; ;; ( ) . then: move: 2 2 rot: 2 goto: $SUFFIX R3 $PREFIX ANIM_NS "stand" delay: $GET_INT DELAY if: not: expr: myvar("d") not: expr: myvar("b") expr: myvar("f") coll: any yes ;; + ;; ;; ( ) . then: move: 2 1 rot: 2 goto: $SUFFIX R4 $PREFIX ANIM_NS "stand" if: not: expr: myvar("b") expr: myvar("f") coll: any yes ;; ( ) + then: move: 1 0 rot: 1 goto: $SUFFIX R5 $PREFIX ANIM_NS "stand" if: not: expr: myvar("b") expr: myvar("f") coll: all no ;; . ;; /* ;; ( )- + - . ;; */*\* ;; . . then: rot: -1 delay: $GET_INT DELAY if: not: expr: myvar("f") expr: myvar("b") then: rot: -1 turn delay: $GET_INT DELAY