Walking senselessly

Started by Icey, Thu 10/02/2011 03:05:28

Previous topic - Next topic

Icey

Is there any way I can keep the player walking even when at the edge of the walkable area?

Like in most games you when walking if you come near a blockage of some sort you are still able to keep moving but still you can not pass.

Galen

Welcome to the future, now its harder to do something half assed then it is to do it properly.

Icey

Wow, Oh well. Thanks though.

Khris

I guess you're using keyboard walking, right?

The thing is, doing it the way it is done in most RPGs more or less offered itself:

if the player presses up, down, left or right -> animate char with respective loop
if the character can actually walk in that direction -> move him a few pixels

You'll note that the above will automatically produce animated walking and the senseless walking at blockades.

Now, this can easily be emulated using AGS, the best way is to code it from scratch though.

Icey

Ok so is possible. But I cant code from scratch :-\

It's cool though, I will live with out it.

Khris

I've coded a replacement for the KeyboardMovement module.

Get it in the thread.

In game_start, put
Code: ags
  KeyboardMovement.SetMode(eKMModePressing);
  KeyboardMovement.SetEdgeAnimation(true);


Please put feedback relating to the module also in the module's thread.

Icey

Oh, I guess I should try it out.

Although I am not using the keyboard only the mouse, however this may change later on and then I will add it.

SMF spam blocked by CleanTalk