GameMaker Making Varied Hitboxes from one Hitbox object

C

CrimsonGuitarist

Guest
I am trying to program a system where I can create one instance of a hitbox object and vary its image_xscale and image_yscale to make varied hitboxes. However, I am having trouble approaching the programming side of this problem. How would I approach programming a system like this?
 
P

Pyxus

Guest
I am trying to program a system where I can create one instance of a hitbox object and vary its image_xscale and image_yscale to make varied hitboxes. However, I am having trouble approaching the programming side of this problem. How would I approach programming a system like this?
I remember coming across this hitbox tutorial a while back, I never bothered to thoroughly read through it since I didnt need it; Perhaps it may be of used to you? At the very least skimming through it might give you an idea of what to do.
Hope it helps!
 

Tsa05

Member
newSize = n*currentSize.

Suppose an object with dimensions 32x32 pixels.
You want the object scaled to fill a region that is 200 pixels wide and 150 pixels tall.

image_xscale = 200 / 32
image_yscale = 150 / 32
 
Top