I need help with trigers: 1) how do you make the camera turn left if the unit turnes left so you will always see his back? 2)how do u make a unot to walk forward so he will go to the left only if he is turned to the left? 3)is it possible to meke the player control the carema with the mouse? 4)how do you make a unit attack the air and if someone is close then hurt him?
1) how do you make the camera turn left if the unit turnes left so you will always see his back?
3rdpersoncam
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Camera - Lock camera target for (player who's supposed to have 3rd person cam) to TheWatchedUnit, offset by (0.00, 0.00) using Default rotation
Camera - Set (player who's supposed to have 3rd person cam)'s camera Rotation to (Facing of TheWatchedUnit) over 1.50 seconds
the 1.5 is just a smoothing factor because its applied each 0.1 seconds. feel free to fiddle with the values. you might also want to change the pitchangle before.
2)how do u make a unot to walk forward so he will go to the left only if he is turned to the left?
Unit - Order TheWatchedUnit to Move To ((Position of (TheWatchedUnit)) offset by 400.00 towards (Facing of (TheWatchedUnit)) degrees)
use unit - issue order targeting a point and point with polar offset for this one.
3)is it possible to meke the player control the carema with the mouse?
i dont think so. not in a direct way since u cant get the mousemovement values.
4)how do you make a unit attack the air and if someone is close then hurt him?
there are different ways to do this. one would be an invisble projectile with aoe on impact targeting the ground in front of the unit - artillerystyle (to trigger this use polar offset again). i think that'd be the easiest way. of course you can just use unit animation attack and check for range and angle to nearby units but thats way more complicated.
I can't find a good trigger that will make the unit turn left if you press left i can only find: if you press left the unit turnes left but only for some degrees and if you press left again he will face the sama dagress.
I believe there is a full 3rd persone shooter system available on wc3campaigns. I remember watching a demo clip of it and being really impressed. Just watch out that such games often suffer from a bit of lag as the game responds to the pressing of buttons. Another way of shooting would be to use a dummy unit as a projectile. Not sure if this would be easier or harder....
You can create blank abilities, and use their shortcuts as keys [e.g. create an ability named Up, which does nothing, and give it shortcut "W". Then create a trigger handling its cast]