InsertWPScript: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) insertWPScript – created via PowerShell script (2025-11-11T21:12:45Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m insertWPScript – created via PowerShell script (2026-01-01T06:03:36Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= insertWPScript|fDescription= 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.|parentFile= cmm.spawnFunctions.lua|syntax= CMM.insertWPScript(WPTbl <TBL>, ScriptString <string>)|return= table|returnDesc= Returns the modified waypoint table with the script task inserted into the task list.|example= CMM.insertWPScript(<wpTable>,<scriptString>)|exampleDesc= Adds a script command to execute "set unit health 100" as a wrapped action task within a waypoint's task structure.|related= |note= |envType= CMM|par1= table WPTbl|reqType1= table|reqName1= WPTbl|desc1= Table representing a waypoint, must contain a task field; if missing, one is | {{Template:FunctionInfo|fName= insertWPScript|fDescription= 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.|parentFile= cmm.spawnFunctions.lua|syntax= CMM.insertWPScript(WPTbl <TBL>, ScriptString <string>)|return= table|returnDesc= Returns the modified waypoint table with the script task inserted into the task list.|example= CMM.insertWPScript(<wpTable>,<scriptString>)|exampleDesc= Adds a script command to execute "set unit health 100" as a wrapped action task within a waypoint's task structure.|related= |note= |envType= CMM|par1= table WPTbl|reqType1= table|reqName1= WPTbl|desc1= Table representing a waypoint, must contain a task field; if missing, one is initialised with default values.|par2= string: ScriptString|reqType2= string:|reqName2= ScriptString|desc2= String containing the script command to execute at the waypoint, must not be nil or empty.}} | ||
Latest revision as of 19:03, 31 December 2025
| 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 initialised 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: | ||