Hi,
I'm currently looking for a script for keyboard movement.
I kno, theres a module, but It should only walk if the key is being pressed (like Jump'n'runs, e.g. Trilby:Art of Theft)
Do you know how to do this?
The code for that is already in the default AGS game- you just need to alter one line in your game's GLOBAL SCRIPT.
OPen up the global script, find game_start, and there, change:
KeyboardMovement.SetMode(eKeyboardMovement_Tapping);
to
KeyboardMovement.SetMode(eKeyboardMovement_Pressing);
You can use two modes in Keyboard Movement module: eKeyboardMovement_Tapping, and eKeyboardMovement_Pressing. Put this line into your game_start function: KeyboardMovement.SetMode(eKeyboardMovement_Pressing);
[EDIT] Sorry, I didn´t see your post, Ghost.
From the module's readme:
Three modes are currently available:
* eKeyboardMovement_None: Keyboard movement disabled (the default)
* eKeyboardMovement_Pressing: Player walks while the direction key is pressed.
Releasing the key stops the character.
* eKeyboardMovement_Tapping: Player starts walking when direction is pressed
once and walks until key is pressed again. Numpad-5 also stops him.
So what you're looking for is eKeyboardMovement_Pressing, if I understand you correctly.
Ah, Mirek beat me. Oh, and Ghost too.
It's high time:
RTFM.
Quote from: KhrisMUC on Tue 12/05/2009 18:27:14
It's high time:
RTFM.
Actually, no, since the keyboard movement script isn't covered in the manual- you can figure out how to change the settings of the module after reading the module documentation.
Maybe a short notice in the main script could be added?Generally spoken you're totally right though, I think we had the same question a couple o'dozens of times. ;)
We need a cool acronym for Do A Friggin' Forum Search.
Technically, the module's manual is right in the header, so his acronym still works.
But I do like DAFFS, or maybe STFF to keep in the same rhythm?
[Edit]: Or maybe FITF (Find [it] In The Forum)?
~Trent
How about "Search The Forums, You!"
Acronym: STFU ;)
Sorry, but I found something... a-v-o's script helped, but although, thank you very much.