How to make a platform game, in which the arrow keys are used

Started by assafkap, Mon 31/08/2009 16:23:08

Previous topic - Next topic

assafkap

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.

Matti

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.

Vince Twelve

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.

Akatosh

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.


SMF spam blocked by CleanTalk