Skip to content

Instantly share code, notes, and snippets.

@NathanielInman
Created October 22, 2020 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NathanielInman/81d80666574e6b87a3550ddb587fc8f4 to your computer and use it in GitHub Desktop.
Save NathanielInman/81d80666574e6b87a3550ddb587fc8f4 to your computer and use it in GitHub Desktop.
tintin basic state controller
#var {state}{none}
#action {%1 says 'spell'}{
#if {"$state" == "none"} {
#var {state}{one};
/* here you'd do stuff based on initial state */
};
#elseif {"$state" == "one"} {
#var {state}{two};
/* here you'd do stuff based on next state step */
};
#else {
#var {state}{none};
/* here you'd do stuff based on last or final state step */
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment