Animation Effect

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Script required to enable or disable an animation effect.)
Line 27: Line 27:
  
 
speed
 
speed
:Value. A multiplier for the execution rate of the animation.
+
:Float. A multiplier for the execution rate of the animation.
 
:Compulsory.  
 
:Compulsory.  
  
Comment: (by pcas1986) Animation effects do not seem to work without use of a script.
+
animation-starts-active
 +
:Boolean. 0 (false, default) = the animation only begins playing when triggered from script. 1 (true) = the animation starts playing immediately when the parent mesh is first created in the scene.
 +
 
 +
animation-has-random-start-position
 +
:Boolean. 0 (false, default) = the animation starts playing from the beginning. 1 (true) = the animation starts at a random position. This is intended to permit multiple instances of a single scenery asset to avoid looking artificially synchronised. Script should avoid attempting to control the animation position if this tag is enabled, as the results may be unpredictable. Typically used with 'animation-starts-active' and 'looped' enabled.
  
 
[[Category:Config Container]]
 
[[Category:Config Container]]

Revision as of 10:43, 28 November 2017

The Animation effect kind is a "mesh-table" Container effect container. The following tags are supported:

kind "animation"
name ""
anim ""
looped 0
speed 1.0

Explanations and default values

The animation effect is used to define the animation for a mesh. Usually, the animation will be controlled by a script related to the asset.

kind

Text. The kind name for this effect container.
Compulsory "animation".

name

Text. A name for this effect container. This name can be used in scripts.
Optional. Default ""

anim

Name. The name of an animation (.kin) file included with this asset
Compulsory.

looped

Boolean. 0 (false) = the animation executes once when triggered, then stops. 1 = the animation restarts when it reaches the end.
Compulsory.

speed

Float. A multiplier for the execution rate of the animation.
Compulsory.

animation-starts-active

Boolean. 0 (false, default) = the animation only begins playing when triggered from script. 1 (true) = the animation starts playing immediately when the parent mesh is first created in the scene.

animation-has-random-start-position

Boolean. 0 (false, default) = the animation starts playing from the beginning. 1 (true) = the animation starts at a random position. This is intended to permit multiple instances of a single scenery asset to avoid looking artificially synchronised. Script should avoid attempting to control the animation position if this tag is enabled, as the results may be unpredictable. Typically used with 'animation-starts-active' and 'looped' enabled.
Personal tools