MarkerBuyUnit
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | MarkerBuyUnit | |
| Function Description: | Spawns a unit or cargo based on a marker event, using the provided spawnable table and unit types. It checks if the item exists in the spawnable list, determines if it's a cargo or ground group, and spawns accordingly with optional AI settings and notifications. | |
| File Location: | cmm.MapCommandFunctions.lua | |
| Syntax: | CMM.MarkerBuyUnit( table EventData ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| EventData | Custom Event Table passed by S_EVENT_MARK_REMOVED EventHandler, contains position and other metadata. | |
| Example: | CMM.MarkerSpawnUnit({pos = vec3(100, 200, 300)}, 123, 1, 1) | |
| Example Description: | Triggers the spawning of a unit with ID 123 on the RED side at position (100, 200, 300) initiated by player 1. | |
| Related Functions: | ||
| Notes: | --TODO Place holder until buy system implemented | |