Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Camellias on Fri 25/11/2016 21:43:22

Title: How would I set up control keys?
Post by: Camellias on Fri 25/11/2016 21:43:22
So I'm in the progress of a top down game, and I've searched it up in multiple places, trying to find and answer, but how would I set controls for the main character(s)? Like, using 'w' as the up key, 'a' as the left key, 's' as the down key, and 'd' as the right key? Thanks for any help someone can provide.
Title: Re: How would I set up control keys?
Post by: tor.brandt on Sat 26/11/2016 10:21:39
There is not one standard way of doing this, it is something you should put in your script.
If you are satisfied with keyboard movement a la King's Quest, you can simply use the "Default game" template when starting your game, since that template already has code for tap keyboard movement.

If you want "while key pressed" movement, you can either:

Use the module by Khris:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=42843.0

Or the code by monkey424:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48167.msg636453360#msg636453360

These are just options found with a quick search of the forums - I think a more thorough search should yield a lot of other options as well, but one of the above should work just fine.