Difference between revisions of "Osiris/API/CharacterMoveToPosition"
From Divinity Engine Wiki
Line 9: | Line 9: | ||
* Use '''ProcCharacterMoveTo''' to avoid the problems mentioned above and several others, except for not participating in combat. | * Use '''ProcCharacterMoveTo''' to avoid the problems mentioned above and several others, except for not participating in combat. | ||
* Use '''ProcStateManagerCharacterMoveTo''' if you also want the character to join combats it encounters on its way. | * Use '''ProcStateManagerCharacterMoveTo''' if you also want the character to join combats it encounters on its way. | ||
+ | * Use '''[[Osiris/API/CharacterLookFromTrigger|CharacterLookFromTrigger]]''' or '''[[Osiris/API/CharacterLookAt|CharacterLookAt]]''' if the character needs to look in a specific direction upon arrival. | ||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/StoryEvent|StoryEvent]] | * [[Osiris/API/StoryEvent|StoryEvent]] |
Revision as of 15:17, 21 December 2017
Full Definition(s)
- call CharacterMoveToPosition((CHARACTERGUID)_Character, (REAL)_X, (REAL)_Y, (REAL)_Z,(INTEGER)_Running, (STRING)_Event)
Description
Makes the character walk (if _Running is 0) or run (if _Running is 1) to (_X, _Y, _Z). Once the character arrives there, the event _Event will be sent to _Character. If the _Character is in combat, they will move out of turn and ignoring remaining AP. If the destination is blocked, the call will fallback to a teleport to the destination or the nearest available position.
Notes
- In practice, the _Y coordinate will be ignored and the character will snap to the floor at the destination location. If the destination location is not valid on the AI grid, the game will find a nearby valid location on the AI grid and move the character there.
- _Character will not participate in combats while it is moving.
- If a player starts a conversation with _Character, _Character will not stop and just keep moving.
- Use ProcCharacterMoveTo to avoid the problems mentioned above and several others, except for not participating in combat.
- Use ProcStateManagerCharacterMoveTo if you also want the character to join combats it encounters on its way.
- Use CharacterLookFromTrigger or CharacterLookAt if the character needs to look in a specific direction upon arrival.