# Expected to be imported by "anim/_spider.fus" # Expected vars: # NS (str), e.g. "spider_" proc "crawl_crush": if: expr: myvar("is_spikeyspider") then: goto delay: "crawl_shielding" else: goto: "dead" state "crawling": rgraph: $PREFIX NS "crawling" hitbox: collmap("stand") # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl" state "uncrawling": rgraph: $PREFIX NS "uncrawling" hitbox: collmap("stand") if() then: goto: "stand" state "crawling_looking_up": rgraph: $PREFIX NS "crawling_looking_up" hitbox: collmap("stand") # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_looking_up_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl_looking_up" state "uncrawling_looking_up": rgraph: $PREFIX NS "uncrawling_looking_up" hitbox: collmap("stand") if() then: goto: "looking_up" state "crawl_looking_up": rgraph: $PREFIX NS "crawl_looking_up" hitbox: collmap("crawl") on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_looking_up_spit" import "anim/_spider_crawl.state.fus" # Uncrawl if: any: key: not isdown d coll: all no ;; (.)- . coll: all no ;; *\*/* ;; - + - ;; */ \* ;; ( ) then: goto delay: "uncrawling_looking_up" if: any: key: wasdown f key: wasdown b key: not isdown x then: goto delay: "crawl_unlook_up" state "crawl_spit": rgraph: $PREFIX NS "crawl_spit" hitbox: collmap("crawl") on "crush": call: "crawl_crush" if() then: goto: "crawl" state "crawl_looking_up_spit": rgraph: $PREFIX NS "crawl_looking_up_spit" hitbox: collmap("crawl") on "crush": call: "crawl_crush" if() then: goto: "crawl_looking_up" state "crawl": rgraph: $PREFIX NS "crawl" hitbox: collmap("crawl") on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" # Uncrawl if: any: key: not isdown d coll: all no ;; (.)- . coll: all no ;; *\*/* ;; - + - ;; */ \* ;; ( ) then: goto delay: "uncrawling" # Crawling (stepping) import "anim/_walker_crawl.state.fus" # Roll over a gap if: expr: myvar("is_rollerspider") key: wasdown f coll: all no ;; \* ;; (.) . then: goto: "roller_stand" move: 1 0 rot: 1 delay: $GET_INT ROLLER_STAND_DELAY # Roll into a corner if: expr: myvar("is_rollerspider") key: wasdown f coll: all yes ;; + ;; \ ;; (.) + then: # TODO: use a different anim, one which shows you # rotating in place, as opposed to this one which # in this case shows you kind of... teleporting # backwards, and then stepping forwards. goto delay: "crawl_step" move: 1 0 rot: 2 # Turn if: key: wasdown b key: not isdown f then: move: 1 0 turn goto: "crawl_turn" delay: 2 # Look up if: expr: myvar("is_aimerspider") key: not isdown f key: wasdown x then: goto: "crawl_look_up" state "crawl_look_up": rgraph: $PREFIX NS "crawl_look_up" hitbox: collmap("crawl") on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_looking_up_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl_looking_up" state "crawl_unlook_up": rgraph: $PREFIX NS "crawl_unlook_up" hitbox: collmap("crawl") on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_looking_up_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl" state "crawl_step_down": rgraph: $PREFIX NS "crawl_step" hitbox: ;; . . ;; *\*/* ;; . -(.) . on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl" state "crawl_step": # If you make changes to this, you'll probably want to make same # changes to crawl_turn rgraph: $PREFIX NS "crawl_step" hitbox: ;; . . ;; */* ;; (.) . on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl" state "crawl_turn": # Like crawl_step, but without the extended hitbox # (so you can turn around in-place while crouching, without exposing yourself # to being crushed) rgraph: $PREFIX NS "crawl_turn" hitbox: collmap("crawl") on "crush": call: "crawl_crush" # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" if() then: goto immediate: "crawl_step" state "crawl_shielding": # This happens when we are crushed while crawling & spikey rgraph: $PREFIX NS "crawl_shielding" hitbox: collmap("crawl") on "crush": # Do nothing # Don't buffer actions (spitting, etc) out of shield?.. if() then: goto: "crawl" state "crawl_flip": rgraph: $PREFIX NS "crawl_flip" hitbox: collmap("crawl") # Actions (spitting, etc) $SET_STR CRAWL_SPIT "crawl_spit" import "anim/_spider_crawl.state.fus" if() then: goto: "crawl"