Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: assafkap on Mon 31/08/2009 16:23:08

Title: How to make a platform game, in which the arrow keys are used
Post by: assafkap on Mon 31/08/2009 16:23:08
Hello

I'm new to AGS and I started making an adventure game, but decided also trying to create a platform game.
So I would like to know how to make the character move using only the arrow keys instead of the mouse.
I'm only interested in making him\her move sideways and up and down, like in a platform game.
I've looked in the game manual and did not find what I was looking for.

Thank you.
Title: Re: How to make a platform game, in which the arrow keys are used
Post by: Matti on Mon 31/08/2009 16:39:00
You could alter the keyboard module that comes with AGS so that diagonal movement isn't allowed (Removing some lines should do the trick I think). Then disable the mouse cursor.
Title: Re: How to make a platform game, in which the arrow keys are used
Post by: Vince Twelve on Mon 31/08/2009 16:40:22
Edit: Matti beat me!

You're going to need to read about the on_key_press or IsKeyPressed functions in the manual.  Start from there and then ask any specific questions you have.

Though, I should also recommend, that while it is possible to make a platform game with AGS, it is not easy and will require a lot of complicated coding.  There are other engines that may be more suited to creating the kind of game you intend to make.
Title: Re: How to make a platform game, in which the arrow keys are used
Post by: Akatosh on Mon 31/08/2009 16:46:27
There's a module from the days of yore somewhere on the forums that does just this, made by one Bernie and called something like 8- or 6-direction-movement. You'll have to dig around a little.
Title: Re: How to make a platform game, in which the arrow keys are used
Post by: assafkap on Tue 01/09/2009 18:38:54
Thanks guys!