Hard box crap
Man, this is so frustrating. This is the situation:
My sprite------>he sprite's hardbox:
------->[h
------->[a
s------>[r
p------>[d
r------>[b
i------>[o
t------>[x
e
in words: the hardbox is WAY above the head of the sprite. the sprite is facing direction 8 (upwards), so when he walks up, he's supposed to hit a tree when it's still miles away. But... it doesn't. It walks against the tree, even somewhat too much. When I change the hardbox, it saves in dinkedit, and I have the properties of the hard box saved in the dink.ini at the dink properties in the beginning of the dink.ini. So it's really saved. It doesn't work when I play though... This is really frustrating and I need your help!
My sprite------>he sprite's hardbox:
------->[h
------->[a
s------>[r
p------>[d
r------>[b
i------>[o
t------>[x
e
in words: the hardbox is WAY above the head of the sprite. the sprite is facing direction 8 (upwards), so when he walks up, he's supposed to hit a tree when it's still miles away. But... it doesn't. It walks against the tree, even somewhat too much. When I change the hardbox, it saves in dinkedit, and I have the properties of the hard box saved in the dink.ini at the dink properties in the beginning of the dink.ini. So it's really saved. It doesn't work when I play though... This is really frustrating and I need your help!
Your sprite's hard box has no effect on whether or not it stops when it hits a tree. Only the depth dot and the tree's hardbox are used.
This is how Dink (who has a hitbox of something like 12 pixels by 6 pixels) can squeeze through hardness holes only a pixel wide.
This is how Dink (who has a hitbox of something like 12 pixels by 6 pixels) can squeeze through hardness holes only a pixel wide.
dang... now I feel pretty stupid. Then what good is it to alter Dink's hardbox?
If you want enemy-doppleganger or something, it can be useful. Or if you suddenly have the urge to make Dink hard.
Dink's hardbox affects whether he's hit when other enemies attack him. It is a little more complicated, where sp_range is used to add padding around a sprite's hardbox to determine where it hits.
If you want to see it in action, just run the game in debug mode. Whenever you (or an enemy) attacks something, you'll see the hardboxes the game uses to determine whether or not a 'hit' really hits or not.
If you want to see it in action, just run the game in debug mode. Whenever you (or an enemy) attacks something, you'll see the hardboxes the game uses to determine whether or not a 'hit' really hits or not.










