TurretAnim: Difference between revisions

Crimsonum (talk | contribs)
mNo edit summary
Testid123 (talk | contribs)
mNo edit summary
(10 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|files={{Categ|ini=rules}}
|files={{Categ|ini=rules}}
|types={{Categ|BuildingTypes}}
|types={{Categ|BuildingTypes}}
|default=none
|values={{values|string|[[Animations]]}}
|values={{values|string|[[Animations]]}}
|ts=yes
|ts=yes
Line 11: Line 12:
|ares=yes
|ares=yes
}}
}}
This flag should be set to the [[animation]] to be rendered as a [[turret]] on this [[BuildingTypes|building type]]. The turret animation can be of three types:
This flag should be set to the [[animation]] to be rendered as a [[turret]] on this [[BuildingTypes|building type]]. The turret animation can be of three types:


== Voxel Turret ==   
== Voxel Turret ==   
To render a [[voxel]] turret on a building, simply put the voxel's file name into the {{f|TurretAnim}} input and give the building the additional tag {{f|TurretAnimIsVoxel|true|link}}; the game will render the voxel directly onto the building without a need for a corresponding {{ini|art}} entry.
Through my various tests, I found that <b>Voxel Turret</b> can have more than one turret.<br>[[File:Voxel Turret x2.png]]<br>
Normally you cannot specify '''TurretAnim=VoxelWO''' is possible, but if you define it like this: It will be available.<br>
example:<br>
'''[GAPOWR]'''<br>
'''{{f|Image|DESTWO|ink}}'''<br>
'''{{f|Turret|yes|ink}}'''<br>
'''{{f|TurretAnim|DEST|ink}}'''<br>
'''{{f|TurretAnimIsVoxel|True|ink}}<br>
'''...'''<br>
Results<br>[[File:TurretAnim=DEST.png]]<br>
If you don't follow the above method. But it's set normally.<br>
'''[GAPOWR]'''<br>
'''{{f|Image|DEST|ink}}'''<br>
'''{{f|Turret|yes|ink}}'''<br>
'''{{f|TurretAnim|DESTWO|ink}}'''<br>
'''{{f|TurretAnimIsVoxel|True|ink}}'''<br>
'''...'''<br>
It will give results like this<br>[[File:TurretAnim=DESTWO.png]]<br>


To render a [[voxel]] turret on a building, simply put the voxel's file name into the {{f|TurretAnim}} input and give the building the additional tag {{f|TurretAnimIsVoxel|true|link}}; the game will render the voxel directly onto the building without a need for a corresponding {{ini|art}} entry.


== SHP Turret ==
== SHP Turret ==
[[File:Turretrotation.png|thumb|frame|Turret shape orientation should start from the ▲ direction and rotate counter-clockwise, like in this example.]] To render a turret [[SHP|shape]] on a building, list the [[SHP|.shp]] animation entry in the {{f|TurretAnim}} input and see that {{f|TurretAnimIsVoxel|false|link}}; the game will expect that the turret animation has an {{ini|art}} entry. Turret shapes should have 32 frames and can have shadow frames, which unlike .shp-based vehicles turrets, do animate their shadows.
[[File:Turretrotation.png|thumb|frame|Turret shape orientation should start from the ▲ direction and rotate counter-clockwise, like in this example.]] To render a turret [[SHP|shape]] on a building, list the [[SHP|.shp]] animation entry in the {{f|TurretAnim}} input and see that {{f|TurretAnimIsVoxel|false|link}}; the game will expect that the turret animation has an {{ini|art}} entry. Turret shapes should have 32 frames and can have shadow frames, which unlike .shp-based vehicles turrets, do animate their shadows.


It will also need these:
It will also need these:<br>
 
  {{f|LoopStart|0|link}}
  {{f|LoopStart|0|link}}
  {{f|LoopEnd|32|link}}
  {{f|LoopEnd|32|link}}
  {{f|LoopCount|-1|link}}
  {{f|LoopCount|-1|link}}
  {{f|Rate|0|link}}
  {{f|Rate|0|link}}
SHP images in <b>TurretAnim</b> can be replaced with other SHP images if the SHP file is specified in the <b>TurretAnim</b> tag. has the tag {{f|Theater|yes|link}} <b>(applies only to theaters where the SHP file has the extension of that theater, such as testtur.tem).</b><br>
Normally name of the SHP turret must be specified in the section. [[Animations]] to make it available.<br>
But if the turret name SHP'''(animation)''' is defined in the [[Trailer]] and [[TrailerAnim]] You do not need to specify Put it in the section [[Animations]]<br>
example:<br>
'''[RING1]''' ;Name of Animations in this section must be specified in the section. [[Animations]] also, otherwise doing this would be useless.<br>
{{f|Trailer|TURSHP|link}}<br>
{{f|TrailerAnim|TURSHP|link}}<br>


== Charge Animation ==
== Charge Animation ==


Here the turret logic has been "hijacked" for a special purpose. If the building has no turret ({{f|Turret|no|link}}) but has a valid {{f|TurretAnim}} entry and a [[primary]] weapon with {{f|Charges|yes|link}}, then this animation is used for the weapon charge-up animation. When the building acquires a target, this animation will play before the weapon can actually fire. An example of this is the Obelisk of Light in {{ts}}. Use {{f|TurretChargeAnimRate|link}} to specify the animation speed.
Here the turret logic has been "hijacked" for a special purpose. If the building has no turret ({{f|Turret|no|link}}) but has a valid {{f|TurretAnim}} entry and a [[primary]] weapon with {{f|Charges|yes|link}}, then this animation is used for the weapon charge-up animation. When the building acquires a target, this animation will play before the weapon can actually fire. An example of this is the Obelisk of Light in {{ts}}. Use {{f|TurretChargeAnimRate|link}} to specify the animation speed.
{{Bugs}}
<b><u>;Even though the turret voxels cannot have shadows But you can create one fake turret and then lowerits height.
until it is level with the ground And then you adjust it to black. to create fake shadows</u></b>
<P Align=center>[[File:Fake Shadow(Voxel).png]]</P><P Align=center><u><b><font style="color:blue>[</font>Fake Shadow(Voxel)<font style="color:blue>]</font></b></u></P><br>
==Note==
*Can be replaced with [[VoxelBarrelFile]] <b>(Disable tag "TurretAnim" and use the [[VoxelBarrelFile]] tag instead)</b>.


== See Also ==
== See Also ==