Difference between revisions of "Osiris/API/CharacterRecruitCharacter"

From Divinity Engine Wiki
Jump to: navigation, search
m (Explain how CharacterRecruitCharacter behaves in case _TargetCharacter is already a player character, and explicitly mention what it does regarding parties.)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* call '''CharacterRecruitCharacter'''('''''[in]'''(CHARACTERGUID)'''''_TargetCharacter''','''''[in]'''(CHARACTERGUID)'''''_OwnerCharacter''')
+
* call '''CharacterRecruitCharacter'''(''(CHARACTERGUID)'''''_TargetCharacter''', ''(CHARACTERGUID)'''''_OwnerCharacter''')
 
===== Description =====
 
===== Description =====
Turns NPC '''_TargetCharacter''' into a player-controlled character. The character will be assigned to the [[Osiris/API/CharacterGetReservedUserID|user]] that hosts the game (and hence also their [[Osiris/API/AddToParty|party]]), and will appear in the portrait list after '''_OwnerCharacter'''.
+
Turns NPC '''_TargetCharacter''' into a [[Osiris/API/CharacterIsPlayer|player-controlled character]]. The character will be assigned to the [[Osiris/API/CharacterGetReservedUserID|user]] that hosts the game, and hence also to their [[Osiris/API/AddToParty|party]]. It will appear in the portrait list after '''_OwnerCharacter'''.
 
===== Notes =====
 
===== Notes =====
* If '''_TargetCharacter''' is already a player-controlled character, this call does nothing; in particular, it will not change the party assignment of '''_TargetCharacter''').
+
* If '''_TargetCharacter''' is already a player-controlled character, this call does nothing. In particular, in that case it will not change the party assignment of '''_TargetCharacter'''.
 +
* Any [[Osiris/API/CharacterIsSummon|summons]] and [[Osiris/API/CharacterAddToParty|party followers]] of '''_TargetCharacter''' will also move to '''_TargetCharacter''''s new party.
 +
* Player characters must be global characters.
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CharacterAddToParty|CharacterAddToParty]]
 
* [[Osiris/API/CharacterAddToParty|CharacterAddToParty]]
Line 11: Line 13:
 
* [[Osiris/API/CharacterMakePlayer|CharacterMakePlayer]]
 
* [[Osiris/API/CharacterMakePlayer|CharacterMakePlayer]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|CharacterRecruitCharacter]]

Latest revision as of 16:07, 11 October 2018

Full Definition(s)
  • call CharacterRecruitCharacter((CHARACTERGUID)_TargetCharacter, (CHARACTERGUID)_OwnerCharacter)
Description

Turns NPC _TargetCharacter into a player-controlled character. The character will be assigned to the user that hosts the game, and hence also to their party. It will appear in the portrait list after _OwnerCharacter.

Notes
  • If _TargetCharacter is already a player-controlled character, this call does nothing. In particular, in that case it will not change the party assignment of _TargetCharacter.
  • Any summons and party followers of _TargetCharacter will also move to _TargetCharacter's new party.
  • Player characters must be global characters.
See Also