Difference between revisions of "Osiris/API/CharacterAddToParty"

From Divinity Engine Wiki
Jump to: navigation, search
(Mention that adding non-player NPCs to a party is not supported.)
(Mention alternatives to use)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* call '''CharacterAddToParty'''(''(INTEGER)'''''_Character''', ''(INTEGER)'''''_PartyCharacter''')
+
* call '''CharacterAddToParty'''(''(CHARACTERGUID)'''''_Character''', ''(CHARACTERGUID)'''''_PartyCharacter''')
 
===== Description =====
 
===== Description =====
Adds the character '''_Character''' to '''_PartyCharacter''''s [[Osiris/API/AddToParty|party]].
+
Deprecated. This is a remnant from DOS1 and should not be used in DOS2.
 +
 
 +
Turning a character into a [[Osiris/API/CharacterRecruitCharacter|player]] or [[Osiris/API/CharacterAssignToUser|assigning it to a user]] automatically adds it to the correct party. Since all characters of a single [[Osiris/API/CharacterGetReservedUserID|user]] must be in the same party and since all characters in a party must be [[Osiris/API/CharacterIsPlayer|player-controlled]], there is no valid use case to explicitly assign a character to a party.
 
===== Notes =====
 
===== Notes =====
* This call will not do anything if '''_Character''' or '''_PartyCharacter''' is NULL, if '''_PartyCharacter''' is not in any party, or if '''_Character''' is already in another party.
+
* Use [[Osiris/API/AddToParty|AddToParty]] instead to assign all characters controlled by a particular user to a different party, [[Osiris/API/LeaveParty|LeaveParty]] to put all of those characters into a new party, or [[Osiris/API/CharacterAssignToUser|CharacterAssignToUser]] to assign a character to a different user (and hence also their, potentially different, party).
* '''_Character''' must be global.
 
* The difference with [[Osiris/API/CharacterRecruitCharacter|CharacterRecruitCharacter]] is that this call does ''not'' turn '''_Character''' into a player character (although '''_Character''' can be a player character). In principle, the underlying routine supports adding individual totems, summons and plain NPCs to the party (as long as they are global, which makes it rather impractical for totems and summons).
 
** Adding non-player NPCs to a party is not supported though, and will result in unpredictable behaviour. Doing so will probably trigger an assert or failure in future versions.
 
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/AddToParty|AddToParty]]
 
* [[Osiris/API/AddToParty|AddToParty]]
 
* [[Osiris/API/CharacterAddToPlayerCharacter|CharacterAddToPlayerCharacter]]
 
* [[Osiris/API/CharacterAddToPlayerCharacter|CharacterAddToPlayerCharacter]]
 +
* [[Osiris/API/CharacterAssignToUser|CharacterAssignToUser]]
 
* [[Osiris/API/CharacterIsPartyMember|CharacterIsPartyMember]]
 
* [[Osiris/API/CharacterIsPartyMember|CharacterIsPartyMember]]
 
* [[Osiris/API/CharacterIsInPartyWith|CharacterIsInPartyWith]]
 
* [[Osiris/API/CharacterIsInPartyWith|CharacterIsInPartyWith]]
Line 21: Line 21:
 
* [[Osiris/API/LeaveParty|LeaveParty]]
 
* [[Osiris/API/LeaveParty|LeaveParty]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|CharacterAddToParty]]

Latest revision as of 08:22, 12 April 2018

Full Definition(s)
  • call CharacterAddToParty((CHARACTERGUID)_Character, (CHARACTERGUID)_PartyCharacter)
Description

Deprecated. This is a remnant from DOS1 and should not be used in DOS2.

Turning a character into a player or assigning it to a user automatically adds it to the correct party. Since all characters of a single user must be in the same party and since all characters in a party must be player-controlled, there is no valid use case to explicitly assign a character to a party.

Notes
  • Use AddToParty instead to assign all characters controlled by a particular user to a different party, LeaveParty to put all of those characters into a new party, or CharacterAssignToUser to assign a character to a different user (and hence also their, potentially different, party).
See Also