Difference between revisions of "PopulateBlobsByNameList"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Populates the 'Blobs By Name List' with all of the CBlobs that currently exist with the given name. </onlyinclude> When you use this function, a list will have...") |
(No difference)
|
Latest revision as of 20:04, 20 August 2012
Populates the 'Blobs By Name List' with all of the CBlobs that currently exist with the given name.
When you use this function, a list will have references to all of the CBlobs that currently exist with the given name put into it.
You can't modify this list directly, but you can use the functions getBlobsByNameListSize and getBlobsByNameListBlob to do things with the CBlobs listed.
void populateBlobsByNameList(const string &blobName)
Example from Rules/Scripts/WAR_Players.as:
// gather all tents and select assigned team's tent CBlob@ tent; populateBlobsByNameList( "tent" ); for (int i=0; i < getBlobsByNameListSize(); i++) { CBlob@ blob = getBlobsByNameListBlob(i); if (blob.getTeamNum() == assignedTeamNum) { @tent = blob; break; } }