Animated objects – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=Overview=
=Overview=
It is possible to create simple animations
Dynamic objects are objects which can be animated using visual scripting. Dynamic object is created when "animated" property is checked on entity, game logic or group. Animation are then applied onto selected object either by assigning appropriate game logic or by using corresponding instruction.


<gallery>
Image:Ylands-Editor-Animator-example3.gif|Animated object
</gallery>


=Animator game logic=
Animators are special game logic, which define a movement. When an animator is assigned to a object, that object will start movement as defined in the animator. Animators can be either assigned trough object properties panel, or from script.


*[[Ylands Game logic - Animator position|'''Position Animator''']] - defines translation animation
*[[Ylands Game logic - Animator rotation|'''Rotation Animator''']] - defines rotation animation


<gallery>
Image:Ylands-Editor-Animator-example1.png
</gallery>


===Animator events===
*When animator is active nad "spawn events" option is enabled, the animator will send [[Ylands Tile - Animator On Cycle End|'''On Animator Cycle End''']] event at the end of each repeat.
===Note===
*Each '''object''' can have assigned '''one movement''' (position) animation and '''one rotation''' animation '''at one time'''. When new animation is assigned, the previous one stops and will be overwritten by new one. Only rotation and position animations stack together.
=Animation instructions=
Dynamic objects does not have to be animated only using animators, it can be also achieved by using specific instructions found in visual scripting. When such instruction is used on dynamic object, that object will start executing instructed movement immediately.
<gallery>
Image:Ylands-Editor-Animator-example2.png|Animation instruction
</gallery>
===Animation events===
*When an object finishes given instruction, it will send corresponding [[Ylands Tile - On Movement End|'''On Movement End''']] or [[Ylands Tile - On Rotation End|'''On Rotation End''']] event.
===Note===
*Animation instruction work only on "dynamic" objects (objects marked as "animated" in properties)
*Any object can have only one translation and rotation animation assigned at one time.




----
----
{{Ylands scripting navbox}}
{{Ylands editor navbox}}


[[Category: How-to]]
[[Category: How-to]]

Revision as of 09:08, 12 June 2019

Overview

Dynamic objects are objects which can be animated using visual scripting. Dynamic object is created when "animated" property is checked on entity, game logic or group. Animation are then applied onto selected object either by assigning appropriate game logic or by using corresponding instruction.

Animator game logic

Animators are special game logic, which define a movement. When an animator is assigned to a object, that object will start movement as defined in the animator. Animators can be either assigned trough object properties panel, or from script.

Animator events

  • When animator is active nad "spawn events" option is enabled, the animator will send On Animator Cycle End event at the end of each repeat.

Note

  • Each object can have assigned one movement (position) animation and one rotation animation at one time. When new animation is assigned, the previous one stops and will be overwritten by new one. Only rotation and position animations stack together.

Animation instructions

Dynamic objects does not have to be animated only using animators, it can be also achieved by using specific instructions found in visual scripting. When such instruction is used on dynamic object, that object will start executing instructed movement immediately.

Animation events

Note

  • Animation instruction work only on "dynamic" objects (objects marked as "animated" in properties)
  • Any object can have only one translation and rotation animation assigned at one time.



Template:Ylands editor navbox