ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

TurretAnim: Difference between revisions

From ModEnc
Jump to navigation Jump to search
TAK02 (talk | contribs)
m codez
Crimsonum (talk | contribs)
No edit summary
Line 1: Line 1:
TurretAnim= tag should be set to the animation to be rendered as a turret on this buildingtype. The turret animations can be two types
{{Flag
|name={{PAGENAME}}
|files={{Categ|ini=rules}}
|types={{Categ|BuildingTypes}}
|values={{values|string|[[Animations]]}}
|ts=yes
|fs=yes
|hp=yes
|ra2=yes
|yr=yes
|ares=yes
}}


Voxel turret
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:


To render a voxel turret on a building, simply put the voxel's file name into the TurretAnim= input and give the building the additional tag TurretAnimIsVoxel=true ; the game will render the voxel directly onto the building without a need for a corresponding art.ini entry  
== Voxel Turret ==  


.Shp 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.
 
== 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.


To render a .shp turret on a building, list the .shp animation entry in the TurretAnim= input and see that TurretAnimIsVoxel=false ; the game will expect that the turret animation has an art.ini entry. Turrets should be 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:


'''LoopStart=0'''
{{f|LoopStart|0|link}}
 
{{f|LoopEnd|32|link}}
'''LoopEnd=32'''
{{f|LoopCount|-1|link}}
{{f|Rate|0|link}}


'''LoopCount=-1'''
== Charge Animation ==


'''Rate=0'''
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.
Animation orientation should start from the ▲ direction and rotate counter clockwise like so:


[[File:Turretrotation.png]]
== See Also ==
* [[TurretAnimIsVoxel]]
* [[TurretAnimDamaged]]
* [[TurretAnimZAdjust]]
* [[TurretChargeAnimRate]]

Revision as of 21:48, 20 January 2022

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: TurretAnim
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: Animations)
Applicable to: BuildingTypes


This flag should be set to the animation to be rendered as a turret on this building type. The turret animation can be of three types:

Voxel Turret

To render a voxel turret on a building, simply put the voxel's file name into the TurretAnim input and give the building the additional tag TurretAnimIsVoxel=true; the game will render the voxel directly onto the building without a need for a corresponding art(md).ini entry.

SHP Turret

Turret shape orientation should start from the ▲ direction and rotate counter-clockwise, like in this example.
To render a turret shape on a building, list the .shp animation entry in the TurretAnim input and see that TurretAnimIsVoxel=false; the game will expect that the turret animation has an art(md).ini 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:

LoopStart=0
LoopEnd=32
LoopCount=-1
Rate=0

Charge Animation

Here the turret logic has been "hijacked" for a special purpose. If the building has no turret (Turret=no) but has a valid TurretAnim entry and a primary weapon with Charges=yes, 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 Tiberian Sun. Use TurretChargeAnimRate to specify the animation speed.

See Also