Inside your project, open the triggers tab (F6). Open the libraries window by hitting CTRL+SHIFT+L. Right click inside the libraries window, move your cursor to "Library" and select "Import Library..." Import my library.
Now you'll need to change the Library ID. Right click on my main library folder, move your cursor to "Library" and select "Change Library ID". Hit the checkbox, and in the text field enter 'WASD'. Hit Okay.
Plug In The Functions
Now all that's left is plugging the functions into your triggers. You will need three triggers total:
A trigger with the event "Any Player presses Down Any Key"
A trigger with the event "Any Player pressed Up Any Key"
A trigger wherein you define which unit each player is controlling
If you don't have one or any of these triggers already, make them. In the KeyDown trigger you will want to add the function WASD KeyDown Check() with the parameters Triggering Player and Key Pressed. You will want to do the same in the KeyUp trigger, except you will call WASD KeyUp Check(). Lastly, wherever you define the units that each player is controlling you will want to call WASD Set Controlled Unit(), passing the player you're setting the unit for as your Player parameter and the unit you want him/her to control as your Unit parameter.
And that's it! Simple right? You can use this for both mouse-look and top-down views. The library uses the unit's speed so no special work is needed to change the movement speed of your unit in the library, simply change your unit's speed the standard way through the data editor.
Thanks. Just, how can i change the A and D keys to rotate my unit and Q and E keys to strafe? I'd like the camera to always be behind my unit (WoW style)
Use unit ->Facing Angle of Unit as the rotational value of your camera or some other similiar fashion pending on how you setted your camera. Edit the original functions for A and D to say Q and E instead. Then write your own functions for getting A and D to do unit -> unit face angle or incorperate it into the library.