Doomhammer
Bob Kotick - Gamers' corporate spoilsport No. 1
- Reaction score
- 67
OK, so quite a long time ago I've made this simple arrow key movement script.
Forward arrow pressed = walk, release = stand
You press the right key
- if the unit stands, it turns 30° to its right. the right key has to be re-pressed to make it turn another 30°
- if the unit walks, it steps diagonally right-forward
same for left or course.
Now what I'd like to improve is to have a rather continuous movement here.
so if you'd press the right key
- and the unit stands, it should turn right until the right key is released
- and the unit walks, it should walk turning right and stop turning when the right key is released
I'm sure it's pretty simple, I just didn't have the head to deeply think about it.
Forward arrow pressed = walk, release = stand
You press the right key
- if the unit stands, it turns 30° to its right. the right key has to be re-pressed to make it turn another 30°
- if the unit walks, it steps diagonally right-forward
same for left or course.
Now what I'd like to improve is to have a rather continuous movement here.
so if you'd press the right key
- and the unit stands, it should turn right until the right key is released
- and the unit walks, it should walk turning right and stop turning when the right key is released
I'm sure it's pretty simple, I just didn't have the head to deeply think about it.