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.
[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
[2024-4-27. : 1: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: Roy, C(a)HeK