Core.RemoveTimedFunctionCS
Removes the named Timed Function from the SILVIA Core’s timer schedules.
Description
If a Timed Function has been scheduled with the SILVIA Core, you can cancel it at any point by naming it with this function. This can be done before it ever executes, or in between recurrences
Example Usage (C#)
//An internal Post-Behavior Script, for instance.
//Note the use of "_core" for internal scripting.
//Suppose someone answered the question before the time limit.
public bool Invoke() {
_core.RemoveTimedFunctionCS("JeopardyTimeLimit");
_core.ApiBrain().SetJump("jeopardy", "contestant_answered", 1.0f); return true;
}
//Below is the method we named above, which is now canceled public bool JeopardyTimeLimit( int id ) {
_core.ApiBrain().SetJump("jeopardy", "buzzed_in_times_up", 1.0f); return true;
}
Parameters
string |
methodName |
The name of the Method in SILVIA’s internal scripts to call after the given delay time. |
Returns
The bool success or failure of the RemoveTimedFunctionCS operation.
See Also
- Core.AddTimedFunctionCS
- ApiBrain().SetJump
- ApiBrain().SetBypassResponse
- ApiBrain().RemoveTimedFunctionsByIDs