Homeworld 2 : FunctionCPU_DoString
Karos Graveyard ::
Function Reference :: Scope Reference :: Variable Reference
CPU_DoString(<iPlayerIndex>, <sStringToEvaluate>)

Description
Evaluates a string as a chunk, and applies it to a particular CPU player.
Appears to allow all manner of AI functions & variable assignments to be called from within SP missions and gametypes.
There are all sorts of commands you'd normally call in the AI LUAs; but this function lets you tinker with them in realtime.

Example
CPU_DoString(1,"Build(shipID)")

Arguments
<iPlayerIndex>: the index number of the CPU player.
<sStringToEvaluate>: the string to evaluate.

Related Pages:
:: ::