I used the bound_height and bound_width vars, so it is dense at 64x64. Also note that it's not made up of overlays. The literal icon is 64x64. The players can attack it in all four tiles it's made up of, but it will only hit someone who's next to its lower left tile. The summary of the problem is...
Problem description: Is there a way to make the large enemy's attacking cover a wider range than 32x32? In actuality, I'm aiming for him to attack everyone surrounding him at once, but everything seems to consider him as 32x32 when he is 64x64. Thanks in advance.
Thank you. Unfortunately, I still can't get it to work for the big mob, but I might get it one day.
|
Why wouldn't it work for the big guy? There should be no problems. 1 thing you could do is use a var to define the range of the hit. I'll use 1 as an example and call it range:
mob/var/range=1 // Everyone's range will be 32x32 by default unless defined otherwise. Then you define the range into the for() code: for(var/mob/M in oview(range)) I use this in my melee system so that I can define different ranges for different characters. I hope this helps. |
Use a pixel_x/y offset on your mob so that the actual 32x32 mob will be in the center. Then all you will have to do is look in front of the mob. If your mob is 64x64, then you likely want to use a pixel_x of -16 and a pixel_y of -16. This will move it 16 pixels to the left and 16 down, which means that the lower left corner(Where you were attacking from) will be in the center.
|
for(var/mob/M in oview(1))
To increase range I would increase the number inside oview(). oview(2) will attack everyone within 2 tiles of it. Also to define a specific direction I use get_dir() like this:
for(var/mob/M in oview(1))
if(get_dir(src, M)==usr)
In that code get_dir() is checking if the direction src is facing is towards M. I hope this helps, this is what I use for my melee system.