User Tools

Site Tools


hpl3:game:scripting:sequences

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl3:game:scripting:sequences [2015/09/17 14:03]
ian.thomas [Important Functions]
hpl3:game:scripting:sequences [2015/09/17 14:05]
ian.thomas [Important Functions]
Line 3: Line 3:
 Many of the events that happen throughout SOMA are triggered sequences - a sound plays, then the player'​s FoV changes, then a light starts flashing etc. etc. We control all of those through a set of wrappers we call Sequences, which hide a bunch of timers away and make things easier to read. Many of the events that happen throughout SOMA are triggered sequences - a sound plays, then the player'​s FoV changes, then a light starts flashing etc. etc. We control all of those through a set of wrappers we call Sequences, which hide a bunch of timers away and make things easier to read.
  
-For each sequence you need a map property to store the state - a ''​cSequenceStatesData''​ property e.g.+For each sequence you need a map property to store the state - a ''​cSequenceStatesData''​ property e.g.
 <​code>​ <​code>​
 cSequenceStatesData mSequenceAlert;​ cSequenceStatesData mSequenceAlert;​
Line 12: Line 12:
 void Sequence_Alert(const tString&​ in asName) void Sequence_Alert(const tString&​ in asName)
 { {
-    Sequence_Begin("​Sequence_Alert",​ mSequenceAlert);​+    Sequence_Begin("​Sequence_Alert",​ mSequenceAlert);​
     ​     ​
     if(Sequence_DoStepAndWait(1.0f)) ​ // Do this step and then wait for 1 second     if(Sequence_DoStepAndWait(1.0f)) ​ // Do this step and then wait for 1 second
Line 58: Line 58:
 ==== Important Functions ==== ==== Important Functions ====
  
-=== Sequence_BeginMark ​the start of a sequence block.+=== Sequence_Begin === 
 +Mark the start of a sequence block.
 === Sequence_End === === Sequence_End ===
 Mark the end of the current sequence block. Mark the end of the current sequence block.
-=== Sequence_StopStop ​the current sequence immediately (sort of like an abort). +=== Sequence_Stop === 
-=== Sequence_DoStepAndWait ===Do the step within the following brackets and then wait for the specified time. +Stop the current sequence immediately (sort of like an abort). 
-=== Sequence_DoStepWaitAndRepeat ===Do the step within the following brackets and then wait for the specified time; repeat for a number of iterations. +=== Sequence_DoStepAndWait === 
-=== Sequence_DoStepAndContinueDo ​the step within the following brackets and then immediately carry on to the next step. +Do the step within the following brackets and then wait for the specified time. 
-=== Sequence_DoStepAndPauseDo ​the step within the following brackets and then pause until ''​Sequence_Resume''​ is called. +=== Sequence_DoStepWaitAndRepeat === 
-=== Sequence_WaitJust ​wait for a set period of time (no step in brackets). +Do the step within the following brackets and then wait for the specified time; repeat for a number of iterations. 
-=== Sequence_PausePause ​the sequence until ''​Sequence_Resume''​ is called. +=== Sequence_DoStepAndContinue === 
-=== Sequence_SkipNextSteps ===Skip the specified number of sequence steps. +Do the step within the following brackets and then immediately carry on to the next step. 
-=== Sequence_SkipNextStepSkip ​the next sequence step. +=== Sequence_DoStepAndPause === 
-=== SequenceStates_PausePause ​a specified sequence. +Do the step within the following brackets and then pause until ''​Sequence_Resume''​ is called. 
-=== SequenceStates_ResumeResume ​the specified sequence. +=== Sequence_Wait === 
-=== SequenceStates_StopStop ​the specified sequence. +Just wait for a set period of time (no step in brackets). 
-=== SequenceStates_IsActive ===Returns true is a particular sequence is active.+=== Sequence_Pause === 
 +Pause the sequence until ''​Sequence_Resume''​ is called. 
 +=== Sequence_SkipNextSteps === 
 +Skip the specified number of sequence steps. 
 +=== Sequence_SkipNextStep === 
 +Skip the next sequence step. 
 +=== SequenceStates_Pause === 
 +Pause a specified sequence. 
 +=== SequenceStates_Resume === 
 +Resume ​the specified sequence. 
 +=== SequenceStates_Stop === 
 +Stop the specified sequence. 
 +=== SequenceStates_IsActive === 
 +Returns true if a particular sequence is active.
hpl3/game/scripting/sequences.txt · Last modified: 2015/09/17 14:05 by ian.thomas