Jump to content

InsertWPScript

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (insertWPScript – created via PowerShell script (2025-11-11T21:12:45Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
WPTblTable representing a waypoint, must contain a task field; if missing, one is initialized with default values.
ScriptStringString 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: