FSM guide

Below is a flow chart for a decoration called [EX]cat.states.

Follow the numbered steps to see how the state changes in a basic decoration.

All source files are available at the bottom.

Blank SVG

Source

[EX]cat.states
image [EX]cat 0 3
image flea
sound meow
sound bell

state IDLE FLEASCRATCH 0
frame 0 0.5 0 0 0 NONE
frame 0 0.5 0 0 0 SETVAR global.FSM_STATE "IDLE"
frame 0 0.5 0 0 0 READY

state FLEASCRATCH IDLE 0
frame 1 2 0 0 0 NONE
frame 1 2 0 0 0 SETVAR global.FSM_STATE "FLEASCRATCH"
frame 1 2 0 0 0 PARTICLES 4 1,3000,0,64,0 0,64,0
frame 1 2 0 0 0 NONE

state DEATH DEAD 0
frame 2 0.166 0 0 0 NONE
frame 2 0.166 0 0 0 SETVAR global.FSM_STATE "DEATH"
frame 2 0.166 0 0 0 NONE

state DEAD NONE 0
frame 3 0.25 0 0 0 NONE
frame 3 0.25 0 0 0 SETVAR global.FSM_STATE "DEAD"
frame 3 0.25 0 0 0 NONE

cat! cat! cat! cat! images/flea.png
[EX]cat.states
[EX]cat.zip - images
flea.png - by ARoachIFoundOnMyPillow actually ants but whatever
meow.wav - Meowing sound effect by Traceletz
bell.wav - by Fupi
FSM.svg
FSM.png

All sounds need to go into the directory Data/Sounds.


All images need to go into the directory Sprites/Decorations.