Difference between revisions of "GetPartyList"
From Dragon Age Toolset Wiki
(Generated by Sunjammer's Dragon Age Script Paser) |
(Added mutch information and an example) |
||
Line 1: | Line 1: | ||
− | |||
{{dafunction | {{dafunction | ||
|name=GetPartyList | |name=GetPartyList | ||
Line 8: | Line 7: | ||
|param1default=-1 | |param1default=-1 | ||
|returntype=object[] | |returntype=object[] | ||
− | |returndesc= | + | |returndesc=An array containing the objects of all the party members. |
|sourcefile=script.ldf | |sourcefile=script.ldf | ||
|sourcemodule= | |sourcemodule= | ||
}} | }} | ||
− | + | == Description == | |
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | <!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | ||
+ | Returns the whole current Party of oCreature (Default is the Hero-Party) | ||
− | + | == Remarks == | |
<!-- This section contains additional comments, observations and known issues. --> | <!-- This section contains additional comments, observations and known issues. --> | ||
+ | The Hero is included in the Array | ||
− | + | == Examples == | |
<!-- This section contains examples transcluded from the snippet library. --> | <!-- This section contains examples transcluded from the snippet library. --> | ||
− | < | + | /********************************************/ |
+ | /* | ||
+ | * Description: | ||
+ | * Checks the whole party for a specified | ||
+ | * item to have in inventory (conversation | ||
+ | * condition script) | ||
+ | * | ||
+ | * Created By: GameScripting | ||
+ | * Created On: 12.01.2011 | ||
+ | */ | ||
+ | /********************************************/ | ||
+ | |||
+ | int StartingConditional() | ||
+ | { | ||
+ | // Gets the Partylist of the Hero | ||
+ | object[] oPartyList = GetPartyList(); | ||
+ | |||
+ | // Gets the size of the Party | ||
+ | int nPartySize = GetArraySize(oPartyList); | ||
+ | |||
+ | // A simple Counter Variable | ||
+ | int i = 0; | ||
+ | object oItem; | ||
+ | |||
+ | // We'll loop though the whole party to check for one of the followers | ||
+ | // to have the specified item | ||
+ | for(i; i < nPartySize; i++) | ||
+ | { | ||
+ | // Get the Item-Object | ||
+ | oItem = GetItemPossessedBy(oPartyList[i], "MyItemTag"); | ||
+ | |||
+ | // If the object is valid return true ... | ||
+ | if(IsObjectValid(oItem)) | ||
+ | { | ||
+ | return TRUE; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // ... otherwise return false | ||
+ | return FALSE; | ||
+ | } | ||
+ | |||
+ | |||
+ | == See also == | ||
<!-- This section contains links to articles, functions or constant groups. --> | <!-- This section contains links to articles, functions or constant groups. --> | ||
+ | GetParty() | ||
[[Category: Party and group control]] | [[Category: Party and group control]] |
Revision as of 18:10, 12 January 2011
Returns the party list for the creature
- Parameters:
- oCreature
- [Undocumented]
- Returns:
- An array containing the objects of all the party members.
- Source:
- script.ldf
Contents
Description
Returns the whole current Party of oCreature (Default is the Hero-Party)
Remarks
The Hero is included in the Array
Examples
/********************************************/ /* * Description: * Checks the whole party for a specified * item to have in inventory (conversation * condition script) * * Created By: GameScripting * Created On: 12.01.2011 */ /********************************************/
int StartingConditional() { // Gets the Partylist of the Hero object[] oPartyList = GetPartyList(); // Gets the size of the Party int nPartySize = GetArraySize(oPartyList); // A simple Counter Variable int i = 0; object oItem; // We'll loop though the whole party to check for one of the followers // to have the specified item for(i; i < nPartySize; i++) { // Get the Item-Object oItem = GetItemPossessedBy(oPartyList[i], "MyItemTag"); // If the object is valid return true ... if(IsObjectValid(oItem)) { return TRUE; } } // ... otherwise return false return FALSE; }
See also
GetParty()