| 07-04-2006, 01:35 PM | #1 |
hi guys im making a multiplayer rpg map and i need to make it so when you hold down the up arrow you walk forward untill you release it, left arrow rotates you untill you release it. also is there a way that they work together at the same time, e.g walk in a circle by pressing up and left. this is what i got already: Trigger: Trigger: |
| 07-04-2006, 02:07 PM | #2 |
What you must do is: Trigger: Trigger: Trigger: P.S. it also moves the unit always to the top, not matter where it is facing, use polar projection for that. |
| 07-04-2006, 02:21 PM | #3 | |
Quote:
also you say it moves it to the top, i want it to move forwards, the way it is facing. i think about the polar offset ive messed with it and came up with this. Trigger: Untitled Trigger 003
![]() Conditions
|
| 07-04-2006, 03:41 PM | #4 |
Use this: It should work well. Trigger: Trigger: Trigger: Trigger: Trigger: Trigger: Trigger: Trigger: Trigger: Move Up
Trigger: Move Down
Trigger: Trigger: Yes.... alot of triggers. EDIT: I Made temppoints but forgot to delete them |
| 07-04-2006, 03:45 PM | #5 |
mabie you should put that as a tutorial so newbies like me can learn, not just copy it! |
| 07-04-2006, 03:51 PM | #6 |
Wait Stop - go back turn around, left my arrow.... Actually there is an RPG system Download map which has stuff like this: http://www.wc3campaigns.net/showthread.php?t=82622 In case that link don't work. Go to Resources/Demo Maps/Systems the map in question is called RPG System -ver 1 The Author has made a very nice arrow key movement system (along with other things) and his triggers are explained very well with comments. Special note - Although the save claims to not work it does - It would appear that the Author of the Map updated the ability but didn't update the tool tip. |
| 07-04-2006, 04:18 PM | #7 |
I would suggest for displacement use powers of 2, as that is the grid base. And since you can't be up and down, or left and right at the same time, I suggest simplifying like: Trigger: |
| 07-04-2006, 05:58 PM | #8 |
I made it so you cant go up and down at the same time anyway. Look at the Enable triggers, the disable the opposite movement. |
| 07-04-2006, 06:16 PM | #9 |
Yeah, I get that, but I think 2 triggers are better than 4, don't you think ;P |
| 07-04-2006, 06:24 PM | #10 |
I think yes, but its not actually better. Using alot of code in a trigger with a IF is not as good as a single bit of code with no IF. Its alot slower. |
| 07-04-2006, 06:40 PM | #11 |
Unless the condition section is evaluated a lot faster than any conditions within the action section, I don't see the real speed improvement at all, particularly when in your triggers your 4 IFs (conditions) statements are ALWAYS evaluated . In mine, if left is true, it doesn't bother to check if right is true. Besides, only one action is actually executed within the ifs. (EDIT: which it shouldn't, damn *goes to fix*) |
