Function; CPU_DoString - HWRM/KarosGraveyard GitHub Wiki

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

Function Reference

Comments

Page Status

Updated Formatting? Initial
Updated for HWRM? Initial