Jump to content

Photo

Enemy Editor Questions


  • Please log in to reply
1 reply to this topic

#1 TLOZace5000

TLOZace5000

    Newbie

  • Members

Posted 30 July 2025 - 04:47 PM

On the "Size" tab of the Enemy Editor, what does everything mean below TileWidth and TileHeight? Is it something to do with hit detection?

 

I am asking about HitWidth, HitHeight, HitZHeight, HitXOffset, HitYOffset, DrawZOffset, DrawXOffset and DrawYOffset.


Edited by TLOZace5000, 30 July 2025 - 05:38 PM.

  • Lightwulf likes this

#2 Moosh

Moosh

    The Mush

  • Moderators

Posted 30 July 2025 - 10:22 PM

Yup, it's hitbox size. Enemy hitboxes extend down and to the right from the top left corner of their position. The hit offsets shift that hitbox over down and to the right. Then the hit width and height determine the size of the hitbox, so for a full tile hitbox this would be the enemy's tile width and height multiplied by 16. So if you wanted to shave 4 pixels off the top and bottom of an enemy, you'd add 4 to the HitYOffset and subtract 8 from the HitHeight.

 

DrawXOffset and DrawYOffset are the same as the hit offsets but applied to the enemy's sprite. It's not super useful outside of ZScript where it's most often used for making enemies go invisible. In older versions DrawYOffset was also sometimes used to simulate the fake Z axis before that was made an actual feature. 




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users