Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From my Amnesia Rebirth Tutorial Series
- //Episode 36 Sequences!
- //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
- //-----------------------------------------------------------
- //Include all sequence functions from the helper script
- #include "helpers/helper_sequences.hps"
- //Create a global variable to store your sequence data
- cSequenceStatesData mSeq_Test;
- //Your sequence function should look like this
- void Seq_Test(const tString &in asTimer){
- }
- //Start your sequence by calling it
- Seq_Test("");
- //timer (String)- name of a timer you would like to pass in.
- //Used to identify the start of the sequence in your sequence function
- Sequence_Begin("Seq_Test", mSeq_Test);
- //functionName (String)- name of the sequence function your are starting.
- //sequenceStateData (cSequenceStatesData)- the cSequenceStatesData variable where all your sequence data will be stored.
- //Used to identify the end of the sequence in your sequence function
- Sequence_End();
- //Skip the next step in the sequence
- Sequence_SkipNextStep();
- //Run the code inside of the statement and then wait a set amount of time (must be placed inside an if, else, while, etc.).
- Sequence_DoStepAndWait(5.0f)
- //time (float)- the amount of seconds that should be waited.
- //Run the code inside of the statement and then move onto the next step (must be placed inside an if, else, while, etc.).
- Sequence_DoStepAndContinue()
- //Run the code inside of the statement and then pause the sequence (must be placed inside an if, else, while, etc.).
- //Note: Sequence must be resumed from outside the sequence statement.
- Sequence_DoStepAndPause(0.0f)
- //time (float)- the amount of seconds that should be waited after the sequence has been resumed.
- //Resume a sequence that had been paused
- SequenceStates_Resume("Seq_Test");
- //functionName (String)- name of the sequence function you want to resume.
- //Example of function usage
- void Seq_Test(const tString &in asTimer){
- Sequence_Begin("Seq_Test", mSeq_Test);
- if(Sequence_DoStepAndWait(5.0f)){
- cLux_AddDebugMessage("Print this and wait 5 seconds...");
- }
- if(Sequence_DoStepAndContinue()){
- cLux_AddDebugMessage("Print this and continue to do something else");
- }
- if(Sequence_DoStepAndWait(5.0f)){
- cLux_AddDebugMessage("Print this and wait 5 seconds...");
- }
- if(Sequence_DoStepAndContinue()){
- cLux_AddDebugMessage("Print this and skip the next step...");
- Sequence_SkipNextStep();
- }
- if(Sequence_DoStepAndContinue()){
- cLux_AddDebugMessage("This is going to be skipped!");
- }
- if(Sequence_DoStepAndPause(0.0f)){
- cLux_AddDebugMessage("This sequence will be paused until the bottle is broken");
- }
- if(Sequence_DoStepAndContinue()){
- cLux_AddDebugMessage("Looks like the bottle broke, finishing sequence!");
- }
- Sequence_End();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement