Difference between revisions of "Osiris/API/CharacterSetAnimationOverride"
From Divinity Engine Wiki
m (link animation table) |
m (Tinkerer moved page Osiris/API/SetAnimationOverride to Osiris/API/CharacterSetAnimationOverride: Synchronised page name with API name) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
Starts the looping animation [[Visual_resource_panel|simple name]] '''_Animation''' on '''_CHARACTER'''. | Starts the looping animation [[Visual_resource_panel|simple name]] '''_Animation''' on '''_CHARACTER'''. | ||
===== Notes ===== | ===== Notes ===== | ||
− | * We have a [[Standard_Character_Animations|list]] of simple names of character animations and the playable races they are available | + | * We have a [[Standard_Character_Animations|list]] of simple names of character animations and the playable races for which they are available. |
* An ongoing animation override can be removed by specifying "" as '''_Animation'''. | * An ongoing animation override can be removed by specifying "" as '''_Animation'''. | ||
* Playing a regular animation, e.g. using [[Osiris/API/PlayAnimation|PlayAnimation]], will also remove an animation override. | * Playing a regular animation, e.g. using [[Osiris/API/PlayAnimation|PlayAnimation]], will also remove an animation override. | ||
− | * Making a character do anything via Osiris, such as [[Osiris/API/CharacterLookAt|looking at]] someone/something or moving around, will also remove an animation override. Note that unless [[Osiris/Shared/DB_DoNotFace|specified otherwise]], by default a character will look at any person that starts talking to them. | + | * Making a character do anything via Osiris or behaviour script, such as [[Osiris/API/CharacterLookAt|looking at]] someone/something or moving around, will also remove an animation override. Note that unless [[Osiris/Shared/DB_DoNotFace|specified otherwise]], by default a character will look at any person that starts talking to them. |
− | * In practice, it is very hard to keep an animation override going for characters that | + | * The default character behaviour (DefaultCharacter.charScript) to run away from harmful surfaces also breaks animation overrides (behaviour scripts get disabled if a character is incapacitated though, so in that case this one will not interfere). |
+ | * In practice, it is very hard to keep an animation override going for characters that can be interacted with. If possible, use a status instead, as these do not get removed at random points (or combine with an incapacitated status, but keep in mind that in this case all behaviour scripts for that character will also be blocked). | ||
+ | |||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/PlayAnimation|PlayAnimation]] | * [[Osiris/API/PlayAnimation|PlayAnimation]] | ||
* Helper [[Osiris/Shared/DB_DoNotFace|DB_DoNotFace]] | * Helper [[Osiris/Shared/DB_DoNotFace|DB_DoNotFace]] | ||
− | [[Category:Osiris Calls]] | + | [[Category:Osiris Calls|CharacterSetAnimationOverride]] |
Latest revision as of 08:39, 30 June 2018
Full Definition(s)
- call CharacterSetAnimationOverride((CHARACTERGUID)_Character, (STRING)_Animation)
Description
Starts the looping animation simple name _Animation on _CHARACTER.
Notes
- We have a list of simple names of character animations and the playable races for which they are available.
- An ongoing animation override can be removed by specifying "" as _Animation.
- Playing a regular animation, e.g. using PlayAnimation, will also remove an animation override.
- Making a character do anything via Osiris or behaviour script, such as looking at someone/something or moving around, will also remove an animation override. Note that unless specified otherwise, by default a character will look at any person that starts talking to them.
- The default character behaviour (DefaultCharacter.charScript) to run away from harmful surfaces also breaks animation overrides (behaviour scripts get disabled if a character is incapacitated though, so in that case this one will not interfere).
- In practice, it is very hard to keep an animation override going for characters that can be interacted with. If possible, use a status instead, as these do not get removed at random points (or combine with an incapacitated status, but keep in mind that in this case all behaviour scripts for that character will also be blocked).
See Also
- PlayAnimation
- Helper DB_DoNotFace