Right now, the arrow keys are used to control a player in every game. How can I change this? I would like to use W,A,S,D as the keys instead up up,left,down,right.
Any ideas?
Regards,
Doriel
Re: changing keys to control character
[Re: Doriel]
#168142 11/20/0713:2911/20/0713:29
Sure, I kind of understand. The only problem is, I can't find that code anywhere. I am using the move.wdl script file. After looking at it, it appears that the code you are describing should be found in a function called _player_intentions(). However, I can't find the function definition anywhere.
Does anyone know what file this function is defined in? Or if it's even the function that I need to change?
- Doriel
Re: changing keys to control character
[Re: Doriel]
#168144 11/21/0713:4811/21/0713:48
These are the lines within the function you need to modify: force.X = strength.X*(KEY_FORCE.Y+JOY_FORCE.Y); // forward/back force.Y = strength.Y*(KEY_COMMA-KEY_PERIOD); // side to side
You can just replace them with something like that: force.X = strength.X*(key_w-key_s); force.Y = strength.Y*(key_a-key_d);