Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting hero wraith's movement
Detecting hero wraith's movement
This topic is locked. You can no longer write replies here.
Oct 1 2009, 8:51 pm
By: Cinolt  

Oct 1 2009, 8:51 pm Cinolt Post #1



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.

Oct 1 2009, 9:01 pm Kaias Post #2



Quote from name:yoonkwun
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.

Oct 1 2009, 9:06 pm Cinolt Post #3



Ah silly mistake, 35x27 pixels work fine. Thanks, I would have never got that.



None.

Oct 1 2009, 9:07 pm Kaias Post #4



Quote from name:yoonkwun
Ah silly mistake, 35x27 pixels work fine. Thanks, I would have never got that.
No problem. 37x27 should work as well.



None.

Oct 1 2009, 10:18 pm rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[04:15 am]
DarkenedFantasies -- you eat lots of beans
[03:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: O)FaRTy1billion[MM]