| 03-14-2003, 04:45 AM | #1 |
CBWhiz and I got together and figured out how to move a unit with the arrow keys (something Goldenurg had done) in multiplayer (something he hadn't :D). It took craploads of test maps to get working properly, but it's finally done, and the unprotected map is attached below. All you can do is walk around with a friend using the arrow keys, but if you know JASS well enough you should be able to add this to your own map. How it works: The arrow keys move the camera. We use GetLocalPlayer() to determine what the camera target is on a specific players machine (since the camera target function usually just works for one player, like selections) and then determine the angle between the hero and the camera target. Then we select a pre-made unit that has the closest angle between the center of the map and itself as to the one between the hero and the camera target. Then a separate trigger detects the selection and makes a move order. Features: -Can work with up to 12 players easily. -You can specify by changing udg_CONSTNumDirections how accurate turning should be. -EXTREMELY optimized so new selections are only made when there's a change in direction. -Stops on a dime -Includes code so that if an enemy is nearby the unit will have a chance to automatically attack without the triggers interferring Stuff you ought to know: -Some triggers are missing events for players 11 and 12 since the map I was originally intending to implement this for only supported ten players. Just copy and paste to add the events. -Letterbox mode is enabled and then disabled over 0 seconds so that the portraits don't appear and therefore don't flash. Delete these actions in melee init to make portraits appear. -Because it selects an invisible circle everytime there's a change in direction, it's difficult to set hero skills and the like the normal way you would because the hero isn't selected. There's two possible solutions for this: 1. Whenever a circle is selected have it reselect the hero (might be flashy) 2. Do what I was going to do, which is make it so that the invisible circles are shops that sell items, and the items have hotkeys, and you setup a battle system through triggers. (If they hit A to buy an attack item, the unit's attack animation plays, and if there are any units in range they get hurt) This is more difficult but probably better. Why am I releasing this before my own map is finished?: Because the community can benefit and because I think the xpack is going to have arrow key events, so this kludge won't be necessary (but who knows, maybe there way won't work as well as mine! :D). Post bugs here and I'll fix them. Do not post that, "I get close to the enemy pally and I can't hit him" as a bug. Stand away from him and stay still for a moment and let your guy automatically attack him. |
| 03-14-2003, 11:29 AM | #2 |
great work, but um wouldn't this belong in the repository? |
| 03-14-2003, 09:54 PM | #3 |
Yes, but I figured it would get more coverage in the map dev forum ;) Meh, I'll just forward people here if they ask about it. |
| 03-15-2003, 12:01 AM | #4 |
You FINALLY released it :D . After weeks after endless weeks of telling me about it I finally get to see it .Now come on people, lets see some real interesting maps instead of more cookie cutter type maps. |
| 03-15-2003, 02:52 AM | #5 |
It was a good collabrative effort between us and the ideas of previous contributors. It was fun working around W3's odd ways :D Funny part is, I have no need for this at all, but whatever - hopefully some brilliant map maker will use it. BTW, Dataangel, I wish you luck on your next map to use this. |
| 03-17-2003, 03:43 AM | #6 |
Wooooo HOooooooo Im putting this baby right to work!!! :D |
| 03-17-2003, 10:59 PM | #7 |
Akk wont work in WE crashes, I extracted the .J and deleted the erraneous trigger funct, but still says it's there :( |
| 04-06-2003, 01:11 PM | #8 |
Guest | cool to see this, thx for figuring out:D |
| 04-20-2003, 09:10 AM | #9 |
Guest | i concider myself a good scripter and i just couldn't make this work. you have my DEEPEST THANKS. i will start making a kickass map right away ;) |
| 04-20-2003, 10:27 AM | #10 |
Guest | can't seem to get it to open in we :( |
| 05-21-2003, 08:18 PM | #11 |
me neather :saddened: |
| 06-15-2003, 04:40 PM | #12 |
could u make so it would be able to open it in UMSWE... plz i need it... |
| 07-25-2003, 08:16 PM | #13 |
im sure this is moot now since tft includes arrow key abilities, buuuuuut you need to enable GetLocalPlayer and the zero based player number triggers for it to work in the gui. you can modify ur stuff urself, or ask umswe maker to do it for ya :D |
| 07-28-2003, 11:33 AM | #14 |
I just used the key events to set a boolean variable (array, depends on player). Then I check that value every X time, and move a unit accordingly. |
| 08-03-2003, 01:29 AM | #15 |
I try to open it in WE for TFt but it just crashes WE. Please help. I want to add a FP view to it and see what happens. |
