Game logic - Animator position – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "[[Ylands " to "[[Ylands:")
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Description=
=Description=
Game logic used to specify movement animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an [[Ylands Tile - Animator On Cycle End|'''End Cycle Event''']] spawned (if enabled).
Game logic used to specify movement animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an [[Ylands:Tile - Animator On Cycle End|'''End Cycle Event''']] spawned (if enabled).


===Important Note===
=== Important Note ===
*Any dynamic object can have '''only one''' [[Ylands Game logic - Animator position|'''Position''']] '''and''' one [[Ylands Game logic - Animator rotation|'''Rotation''']] animator '''assigned''' at time.
*Any dynamic object can have '''only one''' [[Ylands:Game logic - Animator position|'''Position''']] '''and''' one [[Ylands:Game logic - Animator rotation|'''Rotation''']] animator '''assigned''' at time.
*When new Position Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.
*When new Position Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.


=Properties=
= Properties =
[[File:{{PAGENAME}}.png|right|400px|Properties]]
[[File:{{PAGENAME}}.png|right|400px|Properties]]


===Movement===
=== Movement ===
*'''Movement path''' - Movement is defined by path
*'''Movement path''' - Movement is defined by path


===Path===
=== Movement path ===
*'''Around reference points''' - Circular movement around a point
*'''Around reference points''' - Circular movement around a point
**'''Start point''' -  Reference point defining starting position of the movement.
**'''Start point''' -  Reference point defining starting position of the movement.
**'''Center point''' -  Reference point defining center of circle.
**'''Center point''' -  Reference point defining center of circle.
**'''Angle''' - Size of circle sector (arc) in degrees.
**'''Angle''' - Size of circle sector (arc) in degrees.
*'''Between reference points''' - Movement between two points
*'''Between reference points''' - Movement between two points
**'''Start point''' -  Reference point defining starting position of the movement.
**'''Start point''' -  Reference point defining starting position of the movement.
**'''End point''' -  Reference point defining ending position of the movement.
**'''End point''' -  Reference point defining ending position of the movement.


===Loop===  
=== Loop ===
*'''Ping pong''' - Object movement will bounce from start to end and back.
*'''Ping pong''' - Object movement will bounce from start to end and back.
*'''Repeated''' - Object movement will repeat only from start to end.
*'''Repeated''' - Object movement will repeat only from start to end.


===Movement===  
=== Movement ===
*'''Speed''' - Velocity of movement in meters per second.
*'''Speed''' - Velocity of movement in meters per second.
*'''Time''' -  How many seconds the movement (one cycle) should take.
*'''Time''' -  How many seconds the movement (one cycle) should take.
*'''Smoothing''' -  Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end
*'''Smoothing''' -  Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end


===Space===  
=== Space ===
*'''Absolute''' - Object will move in absolute coordinates as defined in animator.
*'''Absolute''' - Object will move in absolute coordinates as defined in animator.
*'''Relative''' - Object movement will be relative to its position and rotation (forward direction).
*'''Relative''' - Object movement will be relative to its position and rotation (forward direction).
*'''Relative to position''' - Object movement will be relative to its position only.
*'''Relative to position''' - Object movement will be relative to its position only.


===Other===  
=== Other ===
*'''Spawn animator events''' -  Whenever the animator will spawn appropriate events or not
*'''Spawn animator events''' -  Whenever the animator will spawn appropriate events or not


=Animator events=
= Animator events =
*[[Ylands Tile - Animator On Cycle End|On Animator Cycle End]]
*[[Ylands:Tile - Animator On Cycle End|On Animator Cycle End]]


=Related instructions=
= Related instructions =
*[[Ylands Tile - Get-Set position animator|Get / Set Position Animator]]
*[[Ylands:Tile - Get-Set position animator|Get / Set Position Animator]]




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}


[[Category: Game Logic]]
[[Category: Game Logic]]
[[Category: Ylands 0.13]]
[[Category: Ylands 0.13]]

Revision as of 17:36, 16 November 2022

Description

Game logic used to specify movement animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an End Cycle Event spawned (if enabled).

Important Note

  • Any dynamic object can have only one Position and one Rotation animator assigned at time.
  • When new Position Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.

Properties

Movement

  • Movement path - Movement is defined by path

Movement path

  • Around reference points - Circular movement around a point
    • Start point - Reference point defining starting position of the movement.
    • Center point - Reference point defining center of circle.
    • Angle - Size of circle sector (arc) in degrees.
  • Between reference points - Movement between two points
    • Start point - Reference point defining starting position of the movement.
    • End point - Reference point defining ending position of the movement.

Loop

  • Ping pong - Object movement will bounce from start to end and back.
  • Repeated - Object movement will repeat only from start to end.

Movement

  • Speed - Velocity of movement in meters per second.
  • Time - How many seconds the movement (one cycle) should take.
  • Smoothing - Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end

Space

  • Absolute - Object will move in absolute coordinates as defined in animator.
  • Relative - Object movement will be relative to its position and rotation (forward direction).
  • Relative to position - Object movement will be relative to its position only.

Other

  • Spawn animator events - Whenever the animator will spawn appropriate events or not

Animator events

Related instructions