| 01-14-2007, 03:04 PM | #1 |
Need help with arrow key movement i can get him to move just not the way i want what am i doing wrong here are my triggers i have four of these and i have eight of these triggers for each way i want my guy to move Trigger: WHAT AM I DOING WRONG I FOLLOWED THE TUTORIAL! |
| 01-14-2007, 04:47 PM | #2 |
You'll want to move the unit to the a point offset from it's current position. |
| 01-14-2007, 05:55 PM | #3 |
Use booleans instead of integers... it's smarter and simpler. |
| 01-14-2007, 06:14 PM | #4 |
I guess it would reserve only one bit instead of 32, but that doesn't make his unit move toward the center of the map... :P Pyrogasm's right though, it would be wiser to use booleans; there's less chance that you'd make an error, though it would be quite difficult to make an error in this case. |
| 01-14-2007, 08:04 PM | #5 |
Change your action to: Trigger: Actions
![]() Set TempPoint = (Position of (BRAHNWINTER))
![]() Set TempPoint2 = (TempPoint offset by 200.00 towards 90.00 degrees)
![]() Unit - Order (BRAHNWINTER) to Move To TempPoint2
![]() Custom script: call RemoveLocation(udg_TempPoint)
![]() Custom script: call RemoveLocation(udg_TempPoint2)Create 2 variables, TempPoint and TempPoint2, both points. If you dont use the 2 Sets, and the 2 RemoveLocation's, you are leaking 2 points every 0.2 seconds, which will make your game lag like hell after a while, so use those. |
| 01-15-2007, 05:23 AM | #6 |
Make 3 triggers for move forward, and 3 triggers for turning each way. The first should check whether someone is pressing the key, and set that boolean to true. The second should check when someone stops pressing the key, and set that boolean to false. The last one should Periodically order the unit to move, using Tidehunter's actions. Then do the same for the left and right keys, except change the angle at which the unit is ordered to move. Otherwise, if you can't understand a thing we're saying, I could dig up one of my old trigger systems.... |
