| 05-08-2004, 04:51 PM | #1 |
I have been successful in creating keyboard controlled unit, however, it is based on using regions does anyone know of a trigger where i.e. Event: Player1(Red) presses left on the keyboard Action: <Part where i need help> move unit to the left |
| 05-08-2004, 05:03 PM | #2 |
Issue Order To Unit Targetting a Point --> Point With Offset. Position of unit with -300, 0 offset. |
| 05-08-2004, 05:17 PM | #3 |
hmm..wierd, it works but then the unit stops at some point perhaps i should increase the x offset? EDIT: Fixed, THANK YOU SO MUCH EDIT2: problem, lol, the unit happens to move toward the center instead... |
| 05-08-2004, 05:51 PM | #4 |
nvm that, i need help w/ a trigger where the unit moves where ever direction if faces |
| 05-08-2004, 05:59 PM | #5 |
Unit - Facing Angle Of Unit is what yer looking for. |
| 05-08-2004, 09:57 PM | #6 |
yeah, i know that but the trigger you first gave me directs the unit to the center i know how to fix this, but it'll take hundred's of triggers/regions, and that would lag the game real bad. im just trying to see if there is a trigger which moves the unit certain distance w/o using regions/offsets |
| 05-19-2004, 10:01 PM | #7 |
Nope, I don't think there is because you have to specify where they will move. And the only way to specify that is by regions and/or offsets of a point. |
| 05-19-2004, 10:34 PM | #8 |
if you want continues moving you need to have it when the player presses one of the arrow keys it turns on a loop that constantly has the unit moving and when the player releases it turns off the condition that allows that loop to run. |
| 05-19-2004, 11:13 PM | #9 |
Decide how far you want the unit to move. 300? The do: Offset X = cos(angle facing) * 300, Offset Y = sin(angle facing) * 300 |
| 05-19-2004, 11:38 PM | #10 |
... Or not. Just order the unit to move to a position offset by 300 of (position of unit) towards (facing degrees of unit) |
| 05-20-2004, 01:00 AM | #11 |
Psh. That's just the LAAAAAZY way out. You don't want to be LAAAAAZY, do you? You're not going to let Blizzard for all the legwork for something you can do yourself, are you? |
| 06-03-2004, 07:09 AM | #12 |
Well hm heres a tid bit... How do I make it so when you hit left and and up your character moves diagonally up-left without over-riding the regular left and up movement triggers? I tried making two evenst when player presses left player presses up/left in the same trigger but it over-rides my regular left and up movement when you press those keys alone. If you have two events in one trigger doesn't that mean both of those events have to be active to start the trigger? And how do I loop it properly so I don't have to keep pressing it to move. I've been trying to loop it but I don't seem to be doin it right. I thought I got it but if I don't put a wait time after the movement event and before the "run this trigger checking conditions" then the game crashes instantly when I hit the arrow and if I add a wait time it will pause after each movement. |
| 06-04-2004, 04:57 AM | #13 |
I would use polar offsets. You'll definitely need a loop to create continuous movement, but basically it'd be something like the following: To move forward: Order Unit to Move To ((Position of (Unit)) offset by 50.00 towards (Facing of (Unit)) degrees) To move left [this won't strafe--holding the button down would essentially run him in circles if you loop it.. a box, if you don't]: Order Unit to Move To ((Position of (Unit)) offset by 50.00 towards (Facing of (Unit) + 90) degrees) To turn left: Make Unit face ((Facing of (Unit)) + 1) degrees over 0.00 seconds. More details might be helpful |
