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.
[10:41 am]
ManCubuS -- Seems like something's broken regarding the site then. Sadge...
[07:36 am]
Oh_Man -- have i ever told u guys my SC2 pro-gamer story
[2026-7-26. : 11:30 pm]
Ultraviolet -- That's strange, it looks like you targeted the base image file (sometimes people make the mistake of just using the imgur page link which doesn't work for embedding) but it still didn't work it sounds like.
[2026-7-26. : 3:34 pm]
ManCubuS -- Used : " [img=https://i.imgur.com/gpOjTuD.jpeg] "
[2026-7-26. : 3:28 pm]
ManCubuS -- Even tried with imgur, doesn't attach.
[2026-7-26. : 3:14 pm]
ManCubuS -- I should try a workaround, thanks! Sadly imgur is blocked in my country for some unknown reason.
[2026-7-26. : 3:05 pm]
NudeRaider -- I think SEN has trouble with https or hotlinking is forbidden. It certainly is nothing about the size, it just fails to get any size. You can get it working if you use imgur and include the actual image link for the img tag. Like this: [img=https://i.imgur.com/ddYqXZa.jpeg]
[2026-7-26. : 11:15 am]
ManCubuS -- Hey fellas! Anyone knows why when I try to upload an image it says "failed to get image size"? I even tried making it so small. Imgur isn't working here and I tried postimg no luck.
[2026-7-23. : 6:40 am]
Oh_Man -- true
[2026-7-23. : 3:16 am]
RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
Please log in to shout.


Members Online: Ultraviolet, NudeRaider, RIVE