Difference between revisions of "Osiris/API/CharacterCreateAtPosition"

From Divinity Engine Wiki
Jump to: navigation, search
m
m (Added extra failure case)
 
Line 4: Line 4:
 
Creates a character of the root template defined by '''_TemplateId''' (in a <root template name>_<root template UUID> format) at the coordinates given by '''_X''', '''_Y''', '''_Z''', and returns it as '''_Created'''. If '''_PlaySpawn''' is '''1''', the creature will play its spawn animation as it appears.
 
Creates a character of the root template defined by '''_TemplateId''' (in a <root template name>_<root template UUID> format) at the coordinates given by '''_X''', '''_Y''', '''_Z''', and returns it as '''_Created'''. If '''_PlaySpawn''' is '''1''', the creature will play its spawn animation as it appears.
 
===== Return Values =====
 
===== Return Values =====
* '''Success/Failure''': Fails if '''_TemplateID''' is not a character or does not exist.
+
* '''Success/Failure''': Fails if '''_TemplateID''' is not a character template, does not exist, or if the template is not a ghost template and no valid AI-grid position can be found within 5 metres of the specified position.
 
* '''_Created''': The character created.
 
* '''_Created''': The character created.
 
===== Notes =====
 
===== Notes =====

Latest revision as of 12:05, 22 June 2018

Full Definition(s)
  • query CharacterCreateAtPosition([in](REAL)_X, [in](REAL)_Y, [in](REAL)_Z, [in](STRING)_TemplateId, [in](INTEGER)_PlaySpawn, [out](CHARACTERGUID)_Created)
Description

Creates a character of the root template defined by _TemplateId (in a <root template name>_<root template UUID> format) at the coordinates given by _X, _Y, _Z, and returns it as _Created. If _PlaySpawn is 1, the creature will play its spawn animation as it appears.

Return Values
  • Success/Failure: Fails if _TemplateID is not a character template, does not exist, or if the template is not a ghost template and no valid AI-grid position can be found within 5 metres of the specified position.
  • _Created: The character created.
Notes
  • /
See Also