Changing code for top down control. Walkable areas

Started by JackAnimated, Sun 17/08/2014 20:40:51

Previous topic - Next topic

JackAnimated

Changing code for top down control.

At the moment AGS is set up for side control. Meaning walkable areas define where a sprites feet may walk. I am creating a top-down view game and so want the walkable areas to restrain where the entire sprite may walk/may not walk. At the moment my sprite overlaps area I do not wish them to tread.

I think the script needs to be edited, probably somewhere about setting the point of feet on a character. Any pointers?


Many thanks.

Khris

You can shift where a character is drawn in relation to their pivot by giving them a negative z-value:
Code: ags
// in game_start()
  player.z = -30;  // 30 pixels down

Just use half the height of your sprite and it should center nicely.


SMF spam blocked by CleanTalk