CAIScript Class¶
The structure used for this class is CAIScript
Quick Ref |
void CAIScript::CAIScript(CResRef cNewResRef, int playerscript) |
void CAIScript::CAIScript() |
void CAIScript::~CAIScript() |
void CAIScript::Add(CAICondition& condition, CAIResponseSet& responseSet) |
void CAIScript::Copy(CTypedPtrList& copyList) |
CAIResponse* CAIScript::Find(CTypedPtrList& triggerList, CGameAIBase* caller) |
void CAIScript::Read(CResRef fileName, int playerScript) |
void CAIScript::WriteToDisk(CString fileName, CGameObject* pAIObj) |
Constructors¶
Name |
Description |
Constructs a |
|
Destroys a |
CAIScript::CAIScript¶
Constructs a CAIScript
object
void CAIScript();
Remarks
Constructs a CAIScript
object
CAIScript::CAIScript¶
Constructs a CAIScript
object
void **CAIScript\:\:CAIScript**\(:ref:`CResRef<CResRef>` cNewResRef, int playerscript);
Parameters
CResRef cNewResRef -
int
playerscript -
Remarks
Constructs a CAIScript
object
CAIScript::~CAIScript¶
Destroys the CAIScript
object
void ~CAIScript();;
Remarks
Destroys the CAIScript
object
Methods¶
Name |
Description |
Add a condition and response to an existing script |
|
Copy a list of script items |
|
Find a trigger within a script and return the response for that |
|
Read a script file from disk as specified by fileName |
|
Writes a script to a file as specified by fileName |
CAIScript::Add¶
Add a condition (CAICondition) and a response (CAIResponseSet) to an existing script
void CAIScript::Add(
CAICondition& condition,
CAIResponseSet& responseSet);
Parameters
CAICondition& condition -
CAIResponseSet& responseSet -
Remarks
CAIScript::Copy¶
Copy a list of script items
void CAIScript::Copy(CTypedPtrList& copyList);
Parameters
CTypedPtrList& copyList -
Remarks
CAIScript::Find¶
Find a trigger within a script and return the response for that
CAIResponse* CAIScript::Find(
CTypedPtrList& triggerList,
CGameAIBase* caller);
Parameters
CTypedPtrList& triggerList -
CGameAIBase* caller -
Return Value
Returns a pointer to a CAIResponse
Remarks
CAIScript::Read¶
Read a script file from disk as specified by fileName
void CAIScript::Read(
CResRef fileName,
int playerScript);
Parameters
CResRef fileName - resource reference of script file to read
int
playerScript -
Remarks
CAIScript::WriteToDisk¶
Writes a script to a file as specified by fileName
void CAIScript::WriteToDisk(
CString fileName,
CGameObject* pAIObj);
Parameters
CString fileName - script filename to write data to
CGameObject* pAIObj -
Remarks