Skip to content

Instantly share code, notes, and snippets.

@ppolsinelli

ppolsinelli/Mission.txt

Last active Mar 28, 2021
Embed
What would you like to do?
/*
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