Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Movement Detection without EUDs
Movement Detection without EUDs
Nov 12 2015, 8:27 am
By: Oh_Man  

Nov 12 2015, 8:27 am Oh_Man Post #1

Find Me On Discord (Brood War UMS Community & Staredit Network)

Could someone please explain to me or point me to resources that explain this.

It works off detecting movement of the hero unit and you can get the spell to fire in that direction. That way the player has some control over the direction of the spell.

Thanks in advance,
Oh_Man.




Nov 12 2015, 5:19 pm CecilSunkure Post #2



While I do recall an inverted location of appropriate size can be used to detect when a unit moves a single pixel, I don't recall a way to get the unit's direction.

One thing you can try is a mobile grid that places an array of locations around your unit, where the top, left, bottom and right locations of the 3x3 mobile grid are sized such that their borders lay just tangent to the hero unit's boundaries. I realize this can be difficult to do since some units AABBs are offset slightly from their center position, and are not all square.



None.

Nov 12 2015, 6:12 pm Roy Post #3

An artist's depiction of an Extended Unit Death

http://www.staredit.net/topic/8993/

Quote from stickynote
As stated in the topic linked to in Kenoli's post, locations do not center exactly on a unit since the smallest unit is 1 pixel. I used 4 inverted locations. 1 that was the width of the unit, 1 that was the height of the unit, 1 that was the unit's width minus 1 pixel, and the last was the height of the unit minus 1 pixel.

All 4 locations are centered on it, but the two that are 1 pixel smaller are centered at the top and left of the unit, with 1 side not touching the unit edge.

So, if the unit leaves both width locations, it has moved right. If it has left the larger location but is still in the smaller one, it has moved left. It is the same with the height locations except for down and up, respectively.
Hope that was understandable.





Nov 13 2015, 1:28 am Oh_Man Post #4

Find Me On Discord (Brood War UMS Community & Staredit Network)

So I'm guessing with this method you can only do cardinal directions and not diagonal?




Nov 13 2015, 4:17 am jjf28 Post #5

Cartography Artisan

Just detect the combos: up&left, up&right, down&left, down&right



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Nov 13 2015, 4:27 am zsnakezz Post #6



Any examples of maps that use this function?



I made the following maps; Hyperion 2, The Undead, The Undead Coop, Realm Rpg beta, and Overlords.

Nov 13 2015, 7:05 am Roy Post #7

An artist's depiction of an Extended Unit Death

Quote from Oh_Man
So I'm guessing with this method you can only do cardinal directions and not diagonal?
You measure the Y-Axis and X-Axis separately with that system, so the solution for deriving diagonals is as simple as jjf says.

Quote from zsnakezz
Any examples of maps that use this function?
This one: http://www.staredit.net/topic/9155/

There are also a bunch of example maps in the topic I linked above.




Nov 13 2015, 8:43 am Oh_Man Post #8

Find Me On Discord (Brood War UMS Community & Staredit Network)

Okay thanks guys I'll get to work on this and report back.




Nov 14 2015, 9:05 pm Zoan Post #9

Math + Physics + StarCraft = Zoan

I came up with a pretty simple way using mobile grids. The downside is that if the unit walks directly along the x or y axis of the map they slow down a ton.

What's happening is the DT is constantly surrounded by 4 locations, and when he moves into one it then detects him being in one of those locations and then repositions the locations around him again, using a 6x6 mobile grid. The mobile grid however doesn't appear over the DT itself (as that would slow him down), but rather in the center of the map. I'm pretty bad at explaining this in words, so I just attached the example map below.

Attachments:
DirectionMovementTest.scx
Hits: 1 Size: 51.58kb



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:20 am]
Symmetry -- Dang I'm up to 155 minerals gambling really pays off guys
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[2026-10-09. : 1:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[2026-10-09. : 1:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
Please log in to shout.


Members Online: NudeRaider, DarkenedFantasies