Osiris/API/CharacterAddToParty

From Divinity Engine Wiki
Revision as of 12:51, 29 November 2017 by Tinkerer (talk | contribs) (Mention that this call is normally never needed.)
Jump to: navigation, search
Full Definition(s)
  • call CharacterAddToParty((INTEGER)_Character, (INTEGER)_PartyCharacter)
Description

Adds the character _Character to _PartyCharacter's party.

Normally, you should never use need nor use this call.

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.
  • _Character must be global.
  • The difference with 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.
    • The only scenario in which this call is useful, and indeed mandatory, is if you remove a player-controlled character from a party using CharacterRemoveFromParty first. You then must add it to a new party again in the same frame, or many things may go wrong (the engine assumes player characters are always in a party).
See Also