InsertWPScript
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | insertWPScript | |
| Function Description: | Inserts a script command into a waypoint task structure by creating a wrapped action task with the provided script string, ensuring proper type validation and task numbering. | |
| File Location: | cmm.spawnFunctions.lua | |
| Syntax: | CMM.insertWPScript( table WPTbl , string: ScriptString ) | |
| Return Value: | table | |
| Parameters: | Name | Description |
| WPTbl | Table representing a waypoint, must contain a task field; if missing, one is initialized with default values. | |
| ScriptString | String containing the script command to execute at the waypoint, must not be nil or empty. | |
| Example: | CMM.insertWPScript(<wpTable>,<scriptString>) | |
| Example Description: | Adds a script command to execute "set unit health 100" as a wrapped action task within a waypoint's task structure. | |
| Related Functions: | ||
| Notes: | ||