I'm trying to detect if a Fenix stopped using an inverted location. I made the inverted location the same size as the Fenix's green square, and if a Fenix isn't in the location, it moves the location ontop of the Fenix. However the map always thinks the Fenix is out of the location.
I even verified they were the same size using paint, they are both 23x19 pixels.
Anything I'm doing wrong?
Attachments:
None.
It looks like you have the location flipped, for some reason DatEdit keeps crashing on me, so I can't be certain, try swapping the width and height.
None.
An artist's depiction of an Extended Unit Death
I wouldn't trust the green box the editor gives you. I made an inverted location fitted for a Zergling and it was quite different from the size shown by SCMD2.
Just tweak the box. Make it small enough so the unit is detected, and then increase the horizontal size to fit, followed by the vertical. It's a bit laborious, but worth it if you want every pixel to count.
I would trust the green box the editor gives you. I wouldn't trust that the center is in the middle of that green box (it isn't). Locations are ALWAYS centered on the center of the unit. Location's centers are symmetrical. Most units are not.
Look in datedit:
Left 11
Right 11
Up 5
Down 13
That means the center is horizontally symmetrical, but is 5 from the top, 13 from the bottom. Make a 23x11 location. Then when the unit moves perfectly UP, it will take 8 pixels for the unit to not be there anymore. Any other way and it will work properly. If you want it to be perfect, don't use fenix, or use mobile grid division.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
It looks like you have the location flipped, for some reason DatEdit keeps crashing on me, so I can't be certain, try swapping the width and height.
It's not flipped width and height, as you can compare in the two pictures.
I wouldn't trust the green box the editor gives you. I made an inverted location fitted for a Zergling and it was quite different from the size shown by SCMD2.
Just tweak the box. Make it small enough so the unit is detected, and then increase the horizontal size to fit, followed by the vertical. It's a bit laborious, but worth it if you want every pixel to count.
I will try this method later.
Quote from name:Zachary Taylor
I would trust the green box the editor gives you. I wouldn't trust that the center is in the middle of that green box (it isn't). Locations are ALWAYS centered on the center of the unit. Location's centers are symmetrical. Most units are not.
Look in datedit:
Left 11
Right 11
Up 5
Down 13
That means the center is horizontally symmetrical, but is 5 from the top, 13 from the bottom. Make a 23x11 location. Then when the unit moves perfectly UP, it will take 8 pixels for the unit to not be there anymore. Any other way and it will work properly. If you want it to be perfect, don't use fenix, or use mobile grid division.
Just curious, where did you get 23x11 from? I tried it and it looks nothing like the green square, it's more long and thin. Doesn't work when I tested it, even when I didn't go perfectly up.
Edit: After a bit of testing, I've found that a 12x11 location works fairly well with Fenix, I dunno if it's exact or not, but it works well enough for me. Haven't had any problems with it yet.
Post has been edited 3 time(s), last time on Jun 11 2009, 3:14 am by yoonkwun.
None.
That means you did it wrong.
Try this location:
Left 121
Top 110
Right 100
Bottom 100
I got 23 from min(left,right)*2+1. I got 11 from min(top,bottom)*2+1. Turns out you can actually have it 12, since it's top limited.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"