GetPartyList

From Dragon Age Toolset Wiki
Revision as of 18:10, 12 January 2011 by GameScripting (Talk | contribs) (Added mutch information and an example)

Jump to: navigation, search

Returns the party list for the creature

[[object[] keyword|object[]]] GetPartyList(
object oCreature = -1
);
Parameters:
oCreature
[Undocumented]
Returns:

An array containing the objects of all the party members.

Source:

script.ldf

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()