*clears throat* Hello AGS community! As you can tell by the title I need help making AGS use the arrow keys instead of the mouse...
I know if I do it one way it'll make the playable person move until another key is pressed.
What i need to know is how do I script it to where you press the arrow key for 2 seconds the character moves for 2 seconds (did that make sence?)
If you are using a recent version of AGS, the Default Game template already deals with keyboard movement, so you don't need to script too much on your own. The code in Keyboard_movement_102 is pretty simple, and all you need to do is change "movement tapping" to "movement pressing". (Tapping means the player walks into a direction until he hits something/another key is pressed)
Thanks ill try that.. ill notify of resutls!
my results are... Where can i find that.. is it in .asc or .ash?
Quote from: The Almighty Metroid on Sat 28/02/2009 21:51:28
my results are... Where can i find that.. is it in .asc or .ash?
as
c. as
h are always header files (like in C/C++), where stuff gets defined.
Edit: My bad, sorry. It's in the global script (still asc), in game_start:
function game_start() {
// Put the code all in a function and then just call the function.
// It saves cluttering up places like game_start.
initialize_control_panel();
// Use the KeyboardMovement module to, per default, replicate the standard
// keyboard movement of most Sierra games. See KeyboardMovement.txt for more info
KeyboardMovement.SetMode(eKeyboardMovement_Tapping);
}
Just set the mode there, in the last line.