Animation Effect
From TrainzOnline
(Difference between revisions)
(Script required to enable or disable an animation effect.) |
(→Explanations and default values) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | The Animation effect kind is a [["mesh-table" Container]] effect container. The following tags are supported: | + | The Animation effect kind is a [["mesh-table" Container]] effect container. |
+ | |||
+ | This page describes [[trainz-build]] 4.6. | ||
+ | |||
+ | The following tags are supported: | ||
kind "animation" | kind "animation" | ||
Line 6: | Line 10: | ||
looped 0 | looped 0 | ||
speed 1.0 | speed 1.0 | ||
+ | animation-starts-active 0 | ||
+ | animation-has-random-start-position 0 | ||
===Explanations and default values=== | ===Explanations and default values=== | ||
Line 17: | Line 23: | ||
:Text. A name for this effect container. This name can be used in scripts. | :Text. A name for this effect container. This name can be used in scripts. | ||
:Optional. Default "" | :Optional. Default "" | ||
+ | :'''Obsolete as of TRS19 111951.''' | ||
anim | anim | ||
Line 27: | Line 34: | ||
speed | speed | ||
− | : | + | :Float. A multiplier for the execution rate of the animation. |
:Compulsory. | :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. | ||
[[Category:Config Container]] | [[Category:Config Container]] |
Latest revision as of 03:17, 17 June 2021
The Animation effect kind is a "mesh-table" Container effect container.
This page describes trainz-build 4.6.
The following tags are supported:
kind "animation" name "" anim "" looped 0 speed 1.0 animation-starts-active 0 animation-has-random-start-position 0
[edit] 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 ""
- Obsolete as of TRS19 111951.
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.