| 03-26-2007, 05:31 AM | #1 |
I used Ant's tutorial for keyboard movement. I believe I followed the steps well, but it doesn't seem to work. When I press the up arrow key it moves my unit closer to the center of the map. When I press both a right or left arrow and an up arrow it doesn't turn and move. While the left and right arrow do turn the unit it turns it for a short amount and then stops turning it. When the unit finally does reach the center of the map the up arrow stops doing anything. Any ideas on what's going on? I could post screen shots of my triggers if asked to. |
| 03-26-2007, 07:16 AM | #2 |
Right click on your trigger, choose copy as text and paste the triggers in [trigger] tags. |
| 03-26-2007, 11:20 PM | #3 | ||
K this good? Detect Arrow key Presses Moving |
| 03-27-2007, 04:01 AM | #4 |
Trigger: Unit - Order P1Ship to Move To ((Center of (Playable map area)) offset by 200.00 towards ((Facing of P1Ship)) + 15.00) degrees)If you didnt want it to move to center of playable map area, why does it say Move to Center of playable map area. You want this: Trigger: Unit - Order P1Ship to Move To ((Position of (P1Ship))) offset by 200.00 towards ((Facing of P1Ship)) + 15.00) degrees)And doing +15 degrees whill make it move to an angle of whee its facing. Hope that solves your problem. |
| 03-27-2007, 06:26 AM | #5 |
k thanks... srry for the stupid question i should have paid more attention to my triggers |
| 03-27-2007, 07:10 PM | #6 |
No problem, i do it all the time :O |
| 08-27-2007, 04:21 PM | #7 |
Sorry to bumb a dead thread, but since I have a question about the same tutorial, I see no reason to create a new one :P Anyway, I've solved the problem with the laggy movement when you use low values to make it smooth, by adding a "play animation" action to the Press forward key. Unfortunaly, it seems that it just works the first time you walk forward, next time it goes back to the lag-style. Maybe I need to remove the normal animations in some way? I've tried, but without succes. This is the triggers: Trigger: Press Up
and the release one: Trigger: EDIT: I've also tried with reset units animations instead of play stand animation, but it doesnt seem to work either way. |
| 08-29-2007, 01:49 PM | #8 |
I think you have to queue the animation. I prefer SetUnitAnimationById , it is much easier to predict its behaviour than the normal animation function |
