| Both sides previous revision Previous revision | |||
|
hpl3:game:scripting:function_reference:helper_props [2015/10/29 09:34] luis |
hpl3:game:scripting:function_reference:helper_props [2015/10/29 09:35] (current) luis |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== helper_sequences.hps ====== | + | ====== helper_props.hps ====== |
| ---- | ---- | ||
| - | == Sequence_Begin == | + | == SwingDoor_PushOpen == |
| <code c++> | <code c++> | ||
| - | void Sequence_Begin(const tString &in asFunction, | + | void SwingDoor_PushOpen(const tString &in asName, |
| - | cSequenceStatesData &aData) | + | float afImpulseAmount, |
| + | int alNumOfTimes=1, | ||
| + | float afTimeBetweenPushes=0.1) | ||
| </code> | </code> | ||
| - | Begins to define a sequence of events. Note that the entire specified function will be run once for every sequence step. | + | Pushes a door open using one or many impulses |
| - | * **asFunction**: the name of the function that Sequence_Begin is called from. Syntax: void Func(const tString &in asSequence) | + | * **asName**: name of the door. |
| - | * **aData**: object containing the state of the sequence. | + | * **afImpulseAmount**: Amount of impulse that will be applied to the door. |
| + | * **alNumOfTimes**: Number of times the impulse will be applied. | ||
| + | * **afTimeBetweenPushes**: Pause interval between two impulses. | ||
| ---- | ---- | ||
| - | == Sequence_End == | + | == _Timer_HelperPushOpen_Impulse == |
| <code c++> | <code c++> | ||
| - | void Sequence_End() | + | void _Timer_HelperPushOpen_Impulse(const tString &in asTimer) |
| </code> | </code> | ||
| - | Ends the definition of a sequence. | ||
| - | ---- | ||
| - | |||
| - | |||
| - | == Sequence_Stop == | ||
| - | <code c++> | ||
| - | void Sequence_Stop() | ||
| - | </code> | ||
| - | Stops the current sequence immediately. | ||
| ---- | ---- | ||
| - | == Sequence_DoStepAndWait == | + | == _Timer_HelperPushOpen_AutoClose == |
| <code c++> | <code c++> | ||
| - | bool Sequence_DoStepAndWait(float afTime) | + | void _Timer_HelperPushOpen_AutoClose(const tString &in asTimer) |
| - | </code> | + | |
| - | Use as an if statement condition to define a single step in a sequence. A step will only be run once per sequence, and delays execution of the next step by a specified time. | + | |
| - | * **afTime**: the time before the next step is called. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == Sequence_DoStepWaitAndRepeat == | + | |
| - | <code c++> | + | |
| - | bool Sequence_DoStepWaitAndRepeat(int alNumOfRepetitions, | + | |
| - | float afWaitTime) | + | |
| </code> | </code> | ||
| Line 53: | Line 37: | ||
| - | == Sequence_DoStepAndContinue == | + | == Grab_GetGrabbedProp == |
| <code c++> | <code c++> | ||
| - | bool Sequence_DoStepAndContinue() | + | cLuxProp Grab_GetGrabbedProp() |
| </code> | </code> | ||
| - | Use as an if statement condition to define a single step in a sequence. A step will only be run once per sequence. This one does not wait and just jumps to the next step | + | Returns the currently grabbed prop, or null if there isn't one. |
| - | ---- | + | **Returns**: a pointer to the currently grabbed prop |
| - | + | ||
| - | + | ||
| - | == Sequence_DoStepAndPause == | + | |
| - | <code c++> | + | |
| - | bool Sequence_DoStepAndPause(float afTime=0) | + | |
| - | </code> | + | |
| - | Use as an if statement condition to define a single step in a sequence. Works similar to Sequence_DoStepAndWait, but pauses the sequence when the step has been executed. To resume, use SequenceStates_Resume("FunctionName") | + | |
| - | * **afTime**: the time before the next step is called after the sequence has been resumed, 0 by default. | + | |
| ---- | ---- | ||
| - | == Sequence_Wait == | + | == Entity_SetCustomInteractIcon == |
| <code c++> | <code c++> | ||
| - | void Sequence_Wait(float afTime) | + | void Entity_SetCustomInteractIcon(const tString &in asName, |
| + | eCrossHairState aIcon) | ||
| </code> | </code> | ||
| - | This is just like an if statement with DoStepAndWait only it does nothing, ie if(Sequence_DoStepAndWait(x)){} Add it to just get a wait before the next step is run | + | Sets the interaction icon for an entity. Currently only works for MoveBody, MoveableButton, Lever, Rigid and Triggers. |
| - | * **afTime**: the time before the next step is called after the sequence has been resumed, 0 by default. | + | * **asName**: name of the entity. |
| - | + | * **aIcon**: The interaction icon. | |
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == Sequence_Pause == | + | |
| - | <code c++> | + | |
| - | void Sequence_Pause() | + | |
| - | </code> | + | |
| - | This is just like an if statement with Sequence_DoStepAndPause only it does nothing, ie if(Sequence_DoStepAndPause(x)){} Add it to just get a pause | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == Sequence_SkipNextSteps == | + | |
| - | <code c++> | + | |
| - | void Sequence_SkipNextSteps(int alStepsToSkip) | + | |
| - | </code> | + | |
| - | Skips a number of steps of the sequence. | + | |
| - | * **alStepsToSkip**: the number of steps to skip. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == Sequence_SkipNextStep == | + | |
| - | <code c++> | + | |
| - | void Sequence_SkipNextStep() | + | |
| - | </code> | + | |
| - | Skips the next step of the sequence. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == SequenceStates_Pause == | + | |
| - | <code c++> | + | |
| - | void SequenceStates_Pause(tString &in asName) | + | |
| - | </code> | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == SequenceStates_Resume == | + | |
| - | <code c++> | + | |
| - | void SequenceStates_Resume(tString &in asName) | + | |
| - | </code> | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == SequenceStates_Stop == | + | |
| - | <code c++> | + | |
| - | void SequenceStates_Stop(tString &in asName) | + | |
| - | </code> | + | |
| - | + | ||
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | == SequenceStates_IsActive == | + | |
| - | <code c++> | + | |
| - | bool SequenceStates_IsActive(tString &in asName) | + | |
| - | </code> | + | |
| ---- | ---- | ||