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.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[01:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Brarfvffk01