doom-state.nv
· 1.5 KiB · Text
Sin formato
Playground
|| :states:
. S_POSS_ATK1 POSS E 10 A_FaceTarget S_POSS_ATK2
. S_POSS_ATK2 POSS F 8* A_PosAttack S_POSS_ATK3
. S_POSS_ATK3 POSS E 8 NULL S_POSS_RUN1
. S_POSS_STND POSS A 10 A_Look S_POSS_STND2
. S_POSS_STND2 POSS B 10 A_Look S_POSS_STND
|| :current state: S_POSS_ATK1
|| :: run
|:: A_Look|
:message: haha, you looked
:halt:
|:: A_FaceTarget|
:message: facing a target
|:: A_PosAttack|
:message: attacking!
|:: NULL|
:message: somehow, it was null?
:halt:
|:: step machine :not found:|
:halted:
|:: step machine? :action: $action|
:: $action
|:: step machine :current state: $state :next state: $next|
:current state: $next
:: clean up
|:: step machine? :current state: $state?|
:: find the state $state
|:: find the state $state :states: $state $sprite $frm $tics $action $nextstate?|
:state: $state
:sprite: $sprite
:frame: $frm
:duration: $tics
:action: $action
:next state: $nextstate
:: reset the states
|:: find the state $state? :states: $1 $2 $3 $4 $5 $6|
:checked states: $1 $2 $3 $4 $5 $6
|:: find the state $state|
:not found:
:: reset the states
|:: reset the states? :checked states: $1 $2 $3 $4 $5 $6|
:states: $1 $2 $3 $4 $5 $6
|:: reset the states|
|:: clean up? :sprite: $sprite|
|:: clean up? :frame: $frame|
|:: clean up? :duration: $duration|
|:: clean up? :action: $action|
|:: clean up? :next state: $next|
|:: clean up|
|:: run :halt:|
|:: run?|
:: step machine
| 1 | || :states: |
| 2 | . S_POSS_ATK1 POSS E 10 A_FaceTarget S_POSS_ATK2 |
| 3 | . S_POSS_ATK2 POSS F 8* A_PosAttack S_POSS_ATK3 |
| 4 | . S_POSS_ATK3 POSS E 8 NULL S_POSS_RUN1 |
| 5 | . S_POSS_STND POSS A 10 A_Look S_POSS_STND2 |
| 6 | . S_POSS_STND2 POSS B 10 A_Look S_POSS_STND |
| 7 | || :current state: S_POSS_ATK1 |
| 8 | || :: run |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |:: A_Look| |
| 14 | :message: haha, you looked |
| 15 | :halt: |
| 16 | |:: A_FaceTarget| |
| 17 | :message: facing a target |
| 18 | |:: A_PosAttack| |
| 19 | :message: attacking! |
| 20 | |
| 21 | |:: NULL| |
| 22 | :message: somehow, it was null? |
| 23 | :halt: |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |:: step machine :not found:| |
| 29 | :halted: |
| 30 | |:: step machine? :action: $action| |
| 31 | :: $action |
| 32 | |:: step machine :current state: $state :next state: $next| |
| 33 | :current state: $next |
| 34 | :: clean up |
| 35 | |:: step machine? :current state: $state?| |
| 36 | :: find the state $state |
| 37 | |
| 38 | |:: find the state $state :states: $state $sprite $frm $tics $action $nextstate?| |
| 39 | :state: $state |
| 40 | :sprite: $sprite |
| 41 | :frame: $frm |
| 42 | :duration: $tics |
| 43 | :action: $action |
| 44 | :next state: $nextstate |
| 45 | :: reset the states |
| 46 | |:: find the state $state? :states: $1 $2 $3 $4 $5 $6| |
| 47 | :checked states: $1 $2 $3 $4 $5 $6 |
| 48 | |:: find the state $state| |
| 49 | :not found: |
| 50 | :: reset the states |
| 51 | |
| 52 | |:: reset the states? :checked states: $1 $2 $3 $4 $5 $6| |
| 53 | :states: $1 $2 $3 $4 $5 $6 |
| 54 | |:: reset the states| |
| 55 | |
| 56 | |:: clean up? :sprite: $sprite| |
| 57 | |:: clean up? :frame: $frame| |
| 58 | |:: clean up? :duration: $duration| |
| 59 | |:: clean up? :action: $action| |
| 60 | |:: clean up? :next state: $next| |
| 61 | |:: clean up| |
| 62 | |
| 63 | |:: run :halt:| |
| 64 | |:: run?| |
| 65 | :: step machine |
| 66 |