Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Detecting unit direction
[SOLVED] Detecting unit direction
This topic is locked. You can no longer write replies here.
Jul 18 2012, 2:27 am
By: Leeroy_Jenkins  

Jul 18 2012, 2:27 am Leeroy_Jenkins Post #1



Hi guys, I need a really precise way to detect movement direction. I want to have a marine that is moving, and I want it to be able to "jump", so I need to know which direction it is moving at the instant the player jumps so the marine can jump in that direction. I was thinking maybe inverted location centering or something? I'll do EUDS as last resort. Any help appreciated!



None.

Jul 18 2012, 2:29 am Azrael Post #2



This might help.

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

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




Jul 18 2012, 8:14 am Vrael Post #3



How precise?

I have an 8-way jump in my map using only mobile grids, it essentially places a grid like such:
-X-
XMX
-X-
where M is your marine and X is a location, then it detects which location the unit moves into. (For diagonals, it checks to see if the unit is in 2 of the locations, then executes that action before it checks each of the 4 solo locations).
if you need more than an 8-way jump you could use a mobile grid like so:

XYXYX
YXXXY
XXMXX
YXXXY
XYXYX

where you would center a special size location on each "Y" in addition to the 4 locations above in order to detect those extra directions. If you need more precision than this, I think you'll need to use Azrael's suggestion of EUDs. I don't know how "precise" you needed so I figure I'd suggest this anyway.



None.

Jul 18 2012, 1:13 pm Sacrieur Post #4

Still Napping

You can use skewed locations, but using EUDs will be your easiest and safest method.



None.

Jul 19 2012, 6:44 am Leeroy_Jenkins Post #5



Quote from Vrael
How precise?

I have an 8-way jump in my map using only mobile grids, it essentially places a grid like such:
-X-
XMX
-X-
where M is your marine and X is a location, then it detects which location the unit moves into. (For diagonals, it checks to see if the unit is in 2 of the locations, then executes that action before it checks each of the 4 solo locations).
if you need more than an 8-way jump you could use a mobile grid like so:

XYXYX
YXXXY
XXMXX
YXXXY
XYXYX

where you would center a special size location on each "Y" in addition to the 4 locations above in order to detect those extra directions. If you need more precision than this, I think you'll need to use Azrael's suggestion of EUDs. I don't know how "precise" you needed so I figure I'd suggest this anyway.

Hmm. This seems like it might be a viable option. Would you mind uploading your map that has this?



None.

Jul 19 2012, 8:36 am LoveLess Post #6

Let me show you how to hump without making love.

Using EUDs to detect not only the direction a unit is facing, but also if it is moving or not, makes this cake.



None.

Jul 20 2012, 12:05 am Leeroy_Jenkins Post #7



Yeah but as I will need a mobile grid for the player to actually jump, I might as well use the same grid to detect direction.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07: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
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- 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
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Roy, jun3hong, Wing Zero