# Expected variables: # ANIM_NS (str), e.g. "bird_", "" # RGRAPH_NS (str): e.g. "spider_", "" #$SET_BOOL CRAWL_MOVE $SET_INT TURN_DELAY 1 $SET_INT FLY_DELAY 2 on "spikeyspit": goto: $PREFIX ANIM_NS "turn" delay: $GET_INT TURN_DELAY state $PREFIX ANIM_NS "stand": rgraph: $PREFIX RGRAPH_NS "bird_stand" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if: key: wasdown u then: goto: $PREFIX ANIM_NS "stand_wings" if: key: wasdown d then: goto: $PREFIX ANIM_NS "crawl_arrive" delay: 1 if: key: wasdown f then: goto: $PREFIX ANIM_NS "step" delay: 1 if: key: wasdown b then: goto: $PREFIX ANIM_NS "turn" delay: $GET_INT TURN_DELAY state $PREFIX ANIM_NS "turn": rgraph: $PREFIX RGRAPH_NS "bird_turn" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: move: 1 0 turn goto: $PREFIX ANIM_NS "turn_arrive" delay: 1 state $PREFIX ANIM_NS "step": rgraph: $PREFIX RGRAPH_NS "bird_step" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if: # Turned off for now (with false)... I think I prefer it so # tapping f attempts a full step. false key: not isdown f then: goto: $PREFIX ANIM_NS "step_rev" delay: 2 if: coll: all yes ;; + ;; ;; . + ;; ;; ( ) . coll: all no ;; . . ;; *\*/* ;; . + - . - . ;; \*/*\* ;; . . . . ;; ;; (.) . then: move: 3 1 rot: 1 goto: $PREFIX ANIM_NS "step_rot_up_arrive" delay: 2 if: coll: all yes ;; ( ) . ;; ;; + + coll: all no ;; . . ;; /*\*/* ;; + - + - . ;; \*/*\* ;; + - . ;; /*\*/* ;; ( ) . - + - . ;; */*\* ;; . . then: move: 1 -1 goto: $PREFIX ANIM_NS "step_down_arrive" delay: 2 if: coll: all yes ;; + + ;; ;; ( ) . coll: all no ;; . . ;; *\*/* ;; . - + - . ;; \*/*\* ;; + - . ;; /*\*/* ;; + - + - . ;; \*/*\* ;; . . ;; ;; ( ) . then: move: 2 1 goto: $PREFIX ANIM_NS "step_up_arrive" delay: 2 if: coll: all yes ;; ( ) + ;; ;; + coll: all no ;; . . ;; /*\*/* ;; + - + - . . ;; \*/*\*/*\*/* ;; + - + - + - . ;; /*\*/*\*/*\* ;; ( ) . - + - . . ;; */*\* ;; . . then: move: 1 0 rot: -1 goto: $PREFIX ANIM_NS "step_rot_down_arrive" delay: 2 if: coll: all yes ;; ( ) + + coll: all no ;; . . . ;; \*/* ;; . . + - . ;; /*\* ;; . + - + ;; \*/* ;; . . + - . ;; /*\* ;; (.) . . then: move: 1 0 goto: $PREFIX ANIM_NS "step_arrive" delay: 2 if() then: goto: $PREFIX ANIM_NS "step_rev" delay: 2 state $PREFIX ANIM_NS "turn_arrive": rgraph: $PREFIX RGRAPH_NS "bird_turn_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_rev": rgraph: $PREFIX RGRAPH_NS "bird_step_rev" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_rot_up_arrive": rgraph: $PREFIX RGRAPH_NS "bird_step_rot_up_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_arrive": rgraph: $PREFIX RGRAPH_NS "bird_step_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_down_arrive": rgraph: $PREFIX RGRAPH_NS "bird_step_down_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_up_arrive": rgraph: $PREFIX RGRAPH_NS "bird_step_up_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "step_rot_down_arrive": rgraph: $PREFIX RGRAPH_NS "bird_step_rot_down_arrive" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand" state $PREFIX ANIM_NS "crawl_arrive": rgraph: $PREFIX RGRAPH_NS "bird_crawl_arrive" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if: then: goto: $PREFIX ANIM_NS "crawl" state $PREFIX ANIM_NS "crawl": rgraph: $PREFIX RGRAPH_NS "bird_crawl" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . $IF SPIDER: if: key: not isdown x coll: all yes ;; (+)- + then: goto: "crawl" if: key: not isdown d coll: all no ;; . . ;; *\*/* ;; . - + - . ;; */ \* ;; . - . ;; ;; . . . ;; ;; ( ) . then: delay: 1 goto: $PREFIX ANIM_NS "crawl_stand" $IF CRAWL_MOVE: if: key: wasdown f coll: all yes ;; + ;; ;; ( ) + then: move: 1 0 rot: 1 delay: 2 if: key: wasdown f coll: all yes ;; ( ) + + coll: all no ;; \*/* ;; + - ;; /*\* ;; ( ) then: move: 1 0 delay: 2 if: key: wasdown f coll: all yes ;; ( ) + ;; ;; + coll: all no ;; \*/* ;; + - ;; /*\*/* ;; ( ) - + - ;; */*\* then: move: 1 0 rot: -1 delay: 2 if: key: wasdown b then: goto: $PREFIX ANIM_NS "crawl_turn" delay: $GET_INT TURN_DELAY state $PREFIX ANIM_NS "crawl_turn": rgraph: $PREFIX RGRAPH_NS "bird_crawl_turn" hitbox: ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: move: 1 0 turn goto: $PREFIX ANIM_NS "crawl_turn_arrive" delay: 1 state $PREFIX ANIM_NS "crawl_turn_arrive": rgraph: $PREFIX RGRAPH_NS "bird_crawl_turn_arrive" hitbox: ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "crawl" state $PREFIX ANIM_NS "crawl_stand": rgraph: $PREFIX RGRAPH_NS "bird_crawl_stand" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if: then: goto: $PREFIX ANIM_NS "stand" #################### # WINGS AND FLYING # #################### state $PREFIX ANIM_NS "stand_wings": rgraph: $PREFIX RGRAPH_NS "bird_stand_wings" if: key: not isdown u then: goto: $PREFIX ANIM_NS "stand" if: key: wasdown f then: goto: $PREFIX ANIM_NS "fly" move: 1 0 delay: $GET_INT FLY_DELAY if: key: wasdown b then: goto: $PREFIX ANIM_NS "turn_wings" delay: $GET_INT TURN_DELAY state $PREFIX ANIM_NS "turn_wings": rgraph: $PREFIX RGRAPH_NS "bird_turn_wings" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: move: 1 0 turn goto: $PREFIX ANIM_NS "turn_arrive_wings" delay: 1 state $PREFIX ANIM_NS "turn_arrive_wings": rgraph: $PREFIX RGRAPH_NS "bird_turn_arrive_wings" collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . if() then: goto: $PREFIX ANIM_NS "stand_wings" state $PREFIX ANIM_NS "fly": rgraph: $PREFIX RGRAPH_NS "bird_fly" unsafe flying collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . . ;; ;; . . . ;; ;; (.) . if() then: goto: $PREFIX ANIM_NS "flying" state $PREFIX ANIM_NS "flying": rgraph: $PREFIX RGRAPH_NS "bird_flying" unsafe flying collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; (.)- . if: key: wentdown u then: rot: 1 continue if: key: wentdown d then: rot: -1 continue if: key: not isdown u coll: all yes ;; . . ;; ;; . . . ;; ;; (+) + coll: all no ;; . - . ;; *\*/* ;; . - + - . ;; */*\* ;; (.) . then: goto: $PREFIX ANIM_NS "stand_wings" if: key: wasdown f then: goto: $PREFIX ANIM_NS "fly" move: 1 0 delay: $GET_INT FLY_DELAY if: key: wasdown b then: goto: $PREFIX ANIM_NS "turn_flying" delay: $GET_INT TURN_DELAY state $PREFIX ANIM_NS "turn_flying": rgraph: $PREFIX RGRAPH_NS "bird_turn_flying" unsafe flying collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . . ;; ;; . . . ;; ;; (.) . if() then: move: 1 0 turn goto: $PREFIX ANIM_NS "turn_arrive_flying" delay: 1 state $PREFIX ANIM_NS "turn_arrive_flying": rgraph: $PREFIX RGRAPH_NS "bird_turn_arrive_flying" unsafe flying collmsgs: "crush" hitbox: ;; . . ;; *\*/* ;; . - + - . ;; */*\* ;; . . ;; ;; . . . ;; ;; (.) . if() then: goto: $PREFIX ANIM_NS "flying"