Difference between revisions of "GetPartyList"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Added mutch information and an example)
(corrected the [[object[]]] to object[])
Line 1: Line 1:
{{dafunction
+
Returns the party list for the creature  
|name=GetPartyList
+
<dascript>
|brief=Returns the party list for the creature
+
object[] GetPartyList(
|param1type=object
+
|param1name=oCreature
+
|param1desc=
+
|param1default=-1
+
|returntype=object[]
+
|returndesc=An array containing the objects of all the party members.
+
|sourcefile=script.ldf
+
|sourcemodule=
+
}}
+
  
 +
    object oCreature = -1
 +
 +
);
 +
</dascript>
 +
'''Parameters:'''
 +
 +
''oCreature''
 +
 +
'''Returns:'''
 +
 +
An array containing the objects of all the party members.
 +
 +
'''Source:'''
 +
 +
[[script.ldf]]
 
== Description ==
 
== 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. -->
Line 68: Line 74:
 
== See also ==
 
== See also ==
 
<!-- This section contains links to articles, functions or constant groups. -->
 
<!-- This section contains links to articles, functions or constant groups. -->
GetParty()
+
[[GetParty]]()
  
 
[[Category: Party and group control]]
 
[[Category: Party and group control]]

Revision as of 18:08, 28 February 2011

Returns the party list for the creature

object[] GetPartyList(
 
    object oCreature = -1 
 
);

Parameters:

oCreature

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