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

YDrawOffset

From ModEnc
Jump to navigation Jump to search
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: YDrawOffset
File(s): art(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: 0
Applicable to: Animations


Adjust the image's Y-draw offset, which basically means that you can move your image.

Notes

positive values move the image down, while
negative values move the image up.

The values are measured in pixels.

You can avoid having to edit your SHP files in order to "move" them up or down simply by using this flag . However, note that this will also affect how the image is layered with others. Moving the image up will cause it to be rendered on a "higher" layer (closer to the screen), and vice versa.

Due to vanilla, you can only use this flag to adjust the image of the animation vertically. From Phobos Build #24, a flag named XDrawOffset was added for horizontal adjustment (positive direction is to the right of the screen).


The following information has not yet been verified. If you can contribute, please do so.

The animation named [RING1] has some additional hard-coded content that may affect this, although it does not seem to be used. However, from Phobos Build #42, the implementation has been changed to avoid being affected by it. If you have knowledge about this part, please rewrite this paragraph.

Bugs/Side-Effects/Unexpected Limitations

While it generally works correctly with common animations including shape debris, the shadow of building animations in the vertical direction only respects settings such as the ActiveAnimY flag—you should use the corresponding setting flags for the building animation category on the building to control its position. This means if you move an animation using YDrawOffset, when this animation serves as a building's ActiveAnim, although its own image is moved, its shadow remains at the original location.

  • The XDrawOffset introduced by Phobos does not have this limitation.
  • When ActiveAnimX or ActiveAnimY is set, XDrawOffset or YDrawOffset will not take effect respectively, nor will cumulative calculations be performed on the values.

See Also