Skip to content

Instantly share code, notes, and snippets.

@ppolsinelli
Last active March 28, 2021 16:46
Show Gist options
  • Save ppolsinelli/c2d69f8f0a1bc6da64a227f95118524d to your computer and use it in GitHub Desktop.
Save ppolsinelli/c2d69f8f0a1bc6da64a227f95118524d to your computer and use it in GitHub Desktop.
/*
Use this as header for each of the missions of your game.
*/
VAR cmd=""
VAR doRun = false
LIST missionType = Sequential, Parallel
VAR tick = 0
VAR backgroundType = ""
-> TEST_COMMANDS
=== TEST_COMMANDS
+ Verify conditions
~cmd = "DOES_RUN"
* Setup environment
~cmd = "SETUP"
+ Run
~cmd = "RUN"
- Actions
{cmd=="DOES_RUN":
-> RUN_VERIFY
}
{cmd=="SETUP":
-> SETUP
}
{cmd=="RUN":
-> RUN
}
-> END
=== RUN_VERIFY
Verifies conditions for this mission to run.
-> TEST_COMMANDS
=== SETUP
~missionType = Sequential
//
Set up type as {missionType}
-> TEST_COMMANDS
=== RUN
RUNNING:
{missionType==Sequential:
~tick+=1
Execute action at tick {tick}
-> DIALOGUE_1
}
{missionType==Parallel:
Tick is irrelevant!
}
=== DIALOGUE_1
* POIROT "Hastings you are late."
-
* HASTINGS "The car was in a bad mood today."
- Continue...
-> TEST_COMMANDS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment