Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Direction Detection
Direction Detection
Jul 25 2008, 12:57 am
By: Brontobyte  

Jul 25 2008, 12:57 am Brontobyte Post #1



Quote
I have a map which uses four Terran Marines.

I want to figure out which direction they are facing (for the most part) based off of there last known direction.

How can I do this?

I have tried Mobile Grids / Unit Grids and they all failed because of the different terrain hight and if the units get too close together.

Help! -Ashamed

I have tried an X,Y 2x2 tile grid and a smaller location to detect when the unit moves out of the X,Y grid, but it only detects up/down OR left/right. I tried various other methods and they all failed. Anything?



None.

Jul 25 2008, 1:01 am Hug A Zergling Post #2



only way i can tell is by getting them to attack obs :(



None.

Jul 25 2008, 1:02 am Tera Post #3



How complex do you want it? :P

If you want to go all out:

Take the same idea that SaLaCiOuS(U) did in his "Unit Coordinates" map and then just detect which value increases/decreases.

If the X value increases the unit is going Right.
If the X value decreases the unit is going Left.
If the Y value increases the unit is going Up.
If the Y value is decreasing the unit is going down.


Post has been edited 5 time(s), last time on Aug 31 2008, 11:39 pm by Tera.



None.

Jul 25 2008, 1:05 am Brontobyte Post #4



Quote from name:Terabyte
How complex do you want it? :P

If you want to go all out:

Take the same idea that SaLaCiOuS(U) did in his "Unit Coordinates" map and then just detect which value increases/decreases.

If the X value increases the unit is going Right.
If the X value decreases the unit is going Left.
If the Y value increases the unit is going Up.
If the Y value is decreasing the unit is going down.

Well simple for the win, but if I need to get my hands dirty triggering, then so be it. :P



None.

Jul 25 2008, 1:24 am FoxWolf1 Post #5



I've been playing with this stuff over the last couple of days. I experimented for a while with a unit coordinates system, but there were a couple of problems. First of all, at higher detection sensitivities, it ran into issues where it would completely skip one of the coordinate units, thus registering the wrong direction when coming back over that unit (mind you, it worked fine when not moving too quickly in a given direction, and I had the thing rigged so that it was trying to track a fast air unit in a 4x speed environment to half a square of precision). Secondly, accommodating diagonals decreased the system's sensitivity, because short of keeping track of the unit's exact coordinates and using triggered math to determine movement direction, the way to detect diagonals was to track motion over a few changes of position, adding to death counts representing different directions, and then detecting the ratio of vertical to horizontal movement...which meant it wouldn't register until after a few detection instances on the unit coordinate bars. I'm now using a mobile grid, which is working brilliantly, though it might not be suitable for your purpose because it requires either open air or open ground.



None.

Jul 25 2008, 2:12 am Ashamed Post #6

Hear me Raor!!

I actually got it! ><!! I will be making a test map for it soon! to show you guys but i did it really simple! I will get that up in a few k k! It only requires about 16 triggers!



None.

Jul 25 2008, 2:13 am Brontobyte Post #7



Quote from Ashamed
I actually got it! ><!! I will be making a test map for it soon! to show you guys but i did it really simple! I will get that up in a few k k! It only requires about 16 triggers!

WOWZERZ! :omfg: :omfg: :omfg: :omfg:



None.

Jul 25 2008, 2:20 am rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Ashamed
I actually got it! ><!! I will be making a test map for it soon! to show you guys but i did it really simple! I will get that up in a few k k! It only requires about 16 triggers!
If it's so simple, it'd be easier to tell us...



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 25 2008, 2:24 am Brontobyte Post #9



Quote from rockz
Quote from Ashamed
I actually got it! ><!! I will be making a test map for it soon! to show you guys but i did it really simple! I will get that up in a few k k! It only requires about 16 triggers!
If it's so simple, it'd be easier to tell us...

One would think. I have been trying for hours. Its easy to figure out if the unit is going Up/Down OR left/right, but its hard to distinguish between the two.



None.

Jul 25 2008, 2:46 am Ashamed Post #10

Hear me Raor!!

Here is my map i made for it!

- Movement detection



None.

Jul 25 2008, 2:53 am Zombiechao Post #11



Its pretty good but what about Diagonals?



None.

Jul 25 2008, 2:57 am Ashamed Post #12

Hear me Raor!!

Its a simple up dc plus left dc = left/up diagonal.. If that makes any sense!



None.

Jul 25 2008, 6:08 am Falkoner Post #13



As I told you over Messenger, Bronto, a mobile grid would be much better suited for what you want, you could simply put locations all around the unit, and then easily detect which one he moves into.



None.

Jul 25 2008, 8:01 am Ashamed Post #14

Hear me Raor!!

This works much easier! >< way less triggers did you look at the map?



None.

Jul 25 2008, 9:54 am Brontobyte Post #15



Quote from Falkoner
As I told you over Messenger, Bronto, a mobile grid would be much better suited for what you want, you could simply put locations all around the unit, and then easily detect which one he moves into.

This was not for my map... :ermm: I just was lost trying to help Ashamed and needed some back up. :P I have my map working fine thank you. :bleh: So far... :crazy:

About your map. I was the one who thought of just detecting the units coordinates and then figuring out if one of them increases or decreases for directional purposes... :rolleyes:

Oh and by the way, you have WAY too many hyper triggers in that map. 4 Hyper triggers works wonders for almost EVERY map. :P



None.

Jul 25 2008, 2:40 pm Falkoner Post #16



Quote
This works much easier! >< way less triggers did you look at the map?

??? I could set up a system that would place all the locations around the hero's unit in a single trigger, and from there it's just triggers for checking which one he enters, and storing that value in a death count. 9 triggers.



None.

Jul 25 2008, 4:00 pm Ashamed Post #17

Hear me Raor!!

Do you use units around him to detect where the locations go?



None.

Jul 25 2008, 4:11 pm Falkoner Post #18



You create 9 units on him and then in the same trigger remove the units and center locations on them in the correct order to get the locations to go around him.



None.

Jul 25 2008, 4:19 pm Ashamed Post #19

Hear me Raor!!

Yeah i can't have that, because it's going to be an arena, say if pl1 and pl2 go next to each other! Oh no the orders all messed up now because both units are trying to be created... ^_^ my system wont do that..!@



None.

Jul 25 2008, 4:23 pm NudeRaider Post #20

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

its no problem... as falk said all is happening in 1 trigger. That, plus the fact that the triggers are checked player by player makes it possible.
You have to create 8 locations per player though.
P1 is refreshing his grid (creates units, centers on them, removes them) then you wait until that player moves.
P2 is also refreshing his grid in that trigger loop but that's np because P1's trigger is done and the units cleaned up alread. So you place the P2 movement locations.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: X405, jun3hong