Staredit Network

Staredit Network -> UMS Assistance -> Detecting Motion?
Report, edit, etc...Posted by qw3rty on 2006-09-18 at 17:30:02
is there a way to detect motion and to know which direction a unit is moving in?

I want the RPG im making to have you be able to do things like backflips and things like that so i think im gonna have to have a way to know what back is.

Or any other way that could work well would be useful too.

thanks
Report, edit, etc...Posted by Oo.Jamal.oO on 2006-09-18 at 17:33:23
You could use a movable grid except slow it down so the unit has time to go to the left right of whatever location.
Report, edit, etc...Posted by fritfrat(U) on 2006-09-18 at 17:51:55
An idea could be to make two 1x1 locations, A and B..

If current player brings exactly 0 unit to location A: center location B on unit owned by current player at location A, center location A on any unit owned by current player at Anywhere.

That would have it so location B centers on where you were standing before. Actual directions would be harder to do, but I might be able to think something up if this doesn't work for you.
Report, edit, etc...Posted by ClearWater on 2006-09-18 at 17:53:12
I did a search for "direction" in the downloads database and this thing came up:
http://www.staredit.net/index.php?download=2756

It uses some sort of mobile grids system in combination with the bring condition.
Report, edit, etc...Posted by Falkoner on 2006-09-18 at 19:24:55
this sounds kinda like the old micro grid map, very hard to setup, the problem isnt with finding when a unit moves, its WHERE it moves
Report, edit, etc...Posted by xMCx on 2006-09-18 at 19:38:32
I saw a tutorial about this in the tutorials database.
Report, edit, etc...Posted by TheKeyToKilling on 2006-09-21 at 10:42:10
QUOTE(qw3rty @ Sep 18 2006, 04:29 PM)
is there a way to detect motion and to know which direction a unit is moving in?

I want the RPG im making to have you be able to do things like backflips and things like that so i think im gonna have to have a way to know what back is.

Or any other way that could work well would be useful too.

thanks
[right][snapback]563356[/snapback][/right]


Yes there is a way... i'm not exactly sure how... but an old friend of mine created a frogger map, even though i don't know if he ever finished it or unbugged it completely, but in the map you select your ling (the frog), then you move the ling (the frog) left, right, forwards (up), or backwards (down) by pushing the arrow keys on the keyboard... pushing the arrow keys on the keyboard actually made the ling move... i'm not sure if he had diagonals on the map or not though, but the point is... that it is possible.
Report, edit, etc...Posted by Zeratul_101 on 2006-09-21 at 10:48:50
QUOTE(TheKeyToKilling @ Sep 21 2006, 08:41 AM)
Yes there is a way... i'm not exactly sure how... but an old friend of mine created a frogger map, even though i don't know if he ever finished it or unbugged it completely, but in the map you select your ling (the frog), then you move the ling (the frog) left, right, forwards (up), or backwards (down) by pushing the arrow keys on the keyboard... pushing the arrow keys on the keyboard actually made the ling move... i'm not sure if he had diagonals on the map or not though, but the point is... that it is possible.
[right][snapback]565359[/snapback][/right]


that is with EUDS and totally unrelated. i suggest checking out the link clearwater suggested. i personally haven't checked it, but it should be fine.
Report, edit, etc...Posted by qw3rty on 2006-09-22 at 04:15:19
OK i went to the link and downloaded the map, but i still cant get it to work right. The locations seem to sometimes center to the side, but sometimes on you from the start. so it starts thinking you are moving west when you are standing still.

then i clicked on the link mobile grid system, and the link didnt work.
Report, edit, etc...Posted by JaFF on 2006-09-22 at 04:23:57
QUOTE(qw3rty @ Sep 22 2006, 11:14 AM)
OK i went to the link and downloaded the map, but i still cant get it to work right. The locations seem to sometimes center to the side, but sometimes on you from the start. so it starts thinking you are moving west when you are standing still.

then i clicked on the link mobile grid system, and the link didnt work.
[right][snapback]565857[/snapback][/right]

Strange, the Direction Detection map works fine for me. Did you change something ? Anyway, the key is understanding the main idea, how it all works.
Report, edit, etc...Posted by qw3rty on 2006-09-22 at 04:26:54
No the map works, but when i try to create the same trigger on mine it doesnt, because the locations dont seem to be centering on the right areas.

i want this for a firewall spell on a map, where you move in the direction that you want to cast firewall, so it doesnt always just cast it one way
Report, edit, etc...Posted by JaFF on 2006-09-22 at 04:33:23
Strange. It should work fine if you just make an exact copy. Well... did for me when I needed it forone map. Check it all again. Don't mess up the locations, and the numbers of SCI that get removed.
Report, edit, etc...Posted by qw3rty on 2006-09-22 at 04:39:06
just to check, the first trigger commented 'setup' is the only one i need if i only want to detect direction, right?

I didnt make an exact copy, because I dont want to detect NW NE SW or SE, just basic north south east and west. ill try it again, but I dont know why it didnt work the first time, i wrote everything down exactly
Report, edit, etc...Posted by JaFF on 2006-09-22 at 04:59:05
QUOTE(qw3rty @ Sep 22 2006, 11:38 AM)
just to check, the first trigger commented 'setup' is the only one i need if i only want to detect direction, right?

I didnt make an exact copy, because I dont want to detect NW NE SW or SE, just basic north south east and west. ill try it again, but I dont know why it didnt work the first time, i wrote everything down exactly
[right][snapback]565865[/snapback][/right]

No. Setup just "sets it up" tongue.gif Notice the pre-last trigger. It sets the locations in the directions according to the marines every time you move. Even this trigger alone doesen't detec direction. To really detec direction, you need the rest triggers, that have actions like "Display [direction] and "set switch [direction is hit]".

Now, to explain how it all works:
1)First, the setup sets the locations around the marine
2)Marines moves
2)-->A)It detects the direction the marines moved to, and gives you the according message
2)-->B)Sets the locations around the marines again

The "2-->A" and "2-->B" execute only if the marine moves.
Report, edit, etc...Posted by qw3rty on 2006-09-22 at 10:37:53
Well the only part i need is to get the locations around the guy. this is what i want it to be like:
when you cast firewall on my map, the locations are set around your guy. they give you abut a second to move up down left or right, and then ,using separate triggers, the firewall is cast in the same direction.
Next Page (1)