I want to detect whether or not a player-owned Hero Wraith is moving or not, so I attempted using the inverted location method. I made a location appearing the same size as the green square on the Hero Wraith, then inverted it, then used triggered that location to always move onto of the hero wraith and if starcraft detects a hero wraith inside the location, make it display text. The exact same size as the green square for the inverted location never works, starcraft never detects it, the dimensions being 38x30 pixels. So I decremented the sides by 1 and tested until I got 35x27 pixels, where starcraft detects it regardless of movement.
Did I do something wrong in the process, and if a hero wraith is a unit that can't use this method, what other movement detection is there other than a 1px location if there is any? Any help is appreciated
None.
I want to detect whether or not a player-owned Hero Wraith is moving or not, so I attempted using the inverted location method. I made a location appearing the same size as the green square on the Hero Wraith, then inverted it, then used triggered that location to always move onto of the hero wraith and if starcraft detects a hero wraith inside the location, make it display text. The exact same size as the green square for the inverted location never works, starcraft never detects it, the dimensions being 38x30 pixels. So I decremented the sides by 1 and tested until I got 35x27 pixels, where starcraft detects it regardless of movement.
Did I do something wrong in the process, and if a hero wraith is a unit that can't use this method, what other movement detection is there other than a 1px location if there is any? Any help is appreciated
At a quick glance it seems that the Wraith collision box is offset down from the center, just a bit. This is why the vertical height of the location needs to by smaller (locations always center in the center of the unit). As for it always detecting it regardless of movement, put the trigger that detects the wraith not being there and before the trigger that continually centers the location.
None.
Ah silly mistake, 35x27 pixels work fine. Thanks, I would have never got that.
None.
Ah silly mistake, 35x27 pixels work fine. Thanks, I would have never got that.
No problem. 37x27 should work as well.
None.
Terran Wraith:
Left 19
Right 18
Up 15
Down 14
All of my preconceived notions are thrown out the window for this one. a 36x28 location works for this one (scmdraft) or a 37x29 pixel location. Those are the max dimensions. This directly conflicts with any normal 32x32 unit like goliath.
Terran Goliath:
Left 16
Right 15
Up 16
Down 15
For goliaths, a 31x31 (scmdraft) or 32x32 (pixel) location works. You'll note that left > right on both, and yet 16+15=31, whereas 19+18=37. The wraith's inverted location is one less than what I would have expected.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"