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

IsTrain: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Blade (talk | contribs)
m d'oh, noticed a typo
No edit summary
Line 15: Line 15:
|rp=yes
|rp=yes
}}<br />
}}<br />
Can be set to 'yes' or 'no' and determines whether or not this VehicleType should be considered a Train. This causes a unit to have several special behaviours in order to act like a train. It causes the unit to be immune to capture by a [[VehicleThief]] type unit as player control can cause the unit to do things that break the illusion of train like behavior. It also prevents the unit turning to a facing that is more than one increment in either direction to the one it is facing per cell travelled and can only turn while moving to an adjacent cell. This prevents it turning back on itself as normal units can but as a real train could not. IsTrain also has the effect of causing any unit in a cell the IsTrain unit is moving into to be destroyed using the warhead specified by [[C4Warhead]]. This flag also determines what units leave a crate when destroyed if [[TrainCrate]] flag is set to 'yes' in a map file. The train logic works best when the unit is restricted to a specific terrain type that is laid in one cell "Tracks" for the unit to follow using [[MovementRestrictedTo]]. The terrain type most commonly used for this is RailRoad and is placed using a dedicated overlay set or terrain tiles.
Can be set to 'yes' or 'no' and determines whether or not this VehicleType should be considered a train. This causes a unit to have several special behaviours in order to act like a train. It causes the unit to be immune to capture by a [[VehicleThief]] type unit as player control can cause the unit to do things that break the illusion of train like behavior. It also prevents the unit turning to a facing that is more than one increment in either direction to the one it is facing per cell travelled and can only turn while moving to an adjacent cell. This prevents it turning back on itself as normal units can but as a real train could not. IsTrain also has the effect of causing any unit or building, in a cell the IsTrain unit is moving into to be destroyed using the warhead specified by [[C4Warhead]], with the exception of other units which have IsTrain set: a unit set to IsTrain may move into the same cell as another unit set to IsTrain, and both units can occupy the same cell at the same time. The unit's pathfinding will ignore buildings in the way to its destination and simply move into them, including buildings owned by the same player, though it will not do so consistently.
This flag also determines what units leave a crate when destroyed if [[TrainCrate]] flag is set to 'yes' in a map file. The train logic works best when the unit is restricted to a specific terrain type that is laid in one cell "Tracks" for the unit to follow using [[MovementRestrictedTo]]. The terrain type most commonly used for this is RailRoad and is placed using a dedicated overlay set or terrain tiles.
 
==Notes==
* The effect of setting IsTrain on ObjectTypes which are not VehicleTypes is not researched.
* The effect of ObjectTypes with IsTrain on OverlayTypes is not researched, but it appears that IsTrain cannot destroy OverlayTypes (e.g. walls).

Revision as of 21:07, 19 March 2020

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: IsTrain
File(s): Rules(md).ini
Values: Booleans
Default: no
Applicable to: VehicleTypes



Can be set to 'yes' or 'no' and determines whether or not this VehicleType should be considered a train. This causes a unit to have several special behaviours in order to act like a train. It causes the unit to be immune to capture by a VehicleThief type unit as player control can cause the unit to do things that break the illusion of train like behavior. It also prevents the unit turning to a facing that is more than one increment in either direction to the one it is facing per cell travelled and can only turn while moving to an adjacent cell. This prevents it turning back on itself as normal units can but as a real train could not. IsTrain also has the effect of causing any unit or building, in a cell the IsTrain unit is moving into to be destroyed using the warhead specified by C4Warhead, with the exception of other units which have IsTrain set: a unit set to IsTrain may move into the same cell as another unit set to IsTrain, and both units can occupy the same cell at the same time. The unit's pathfinding will ignore buildings in the way to its destination and simply move into them, including buildings owned by the same player, though it will not do so consistently. This flag also determines what units leave a crate when destroyed if TrainCrate flag is set to 'yes' in a map file. The train logic works best when the unit is restricted to a specific terrain type that is laid in one cell "Tracks" for the unit to follow using MovementRestrictedTo. The terrain type most commonly used for this is RailRoad and is placed using a dedicated overlay set or terrain tiles.

Notes

  • The effect of setting IsTrain on ObjectTypes which are not VehicleTypes is not researched.
  • The effect of ObjectTypes with IsTrain on OverlayTypes is not researched, but it appears that IsTrain cannot destroy OverlayTypes (e.g. walls).