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:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[2024-4-25. : 7:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: Roy