bounds(ref,x,y,width,height)
would produce a bounding box the size of the player's and add additional width and height, what I don't understand is how to make a bounding box that simply attacks in a line forward, regardless of the x and y
for instance, if the mob's bounding box is 8x8 yet I want it to poke stuff with a rod 16 pixelsin front, it'll leave a gap between the player and the end of the hitbox.
bounds(src,16,0)//the person is facing east, so 16 pixels to the right
^
|
that doesn't work, and I can see why, now here's what I really don't get
bounds(src,16,0,8,0)//now the bounding box is 8 pixels longer
this still doesn't work.
My questions:
is that 8 pixels going even further east, or should it fill in the 8 pixel-gap between the hit box and the player.
What if I want it to be wider than the player, evenly, i.e: an arc-shaped swing, would adding to the height of the hitbox only make it extend upwards?
do I have to use the other format for the bounds proc to get what I desire? (bounds(x,y,width,height,z)
Do the x and y of that format represent tiles or pixels?
If it represents tiles, how do I make that location pixel offset to my mob?
It's going farther east. Positive values will always travel East on the X axis, and North on the Y axis. Set the value to a -8 for proper closure.
This is a 2:1 ratio. You must expand the box by at least 2. Expand by the width if facing East or West. Expand by the height if facing North or South.
This means that you must add 2 pixels onto the height or width or a box minimum, and for every 2 to expand it, you have to adjust it's position by 1 pixel. This will make it properly centered.
Not unless you plan on attacking potential mobs on higher or lower layers.
Pixels. Pixels can be calculated within a tile using the step_x and step_y variables.
See above.