Changing Hotspot of sprite

Started by Wogoat, Fri 28/12/2012 07:35:57

Previous topic - Next topic

Wogoat

I'm working on a project that has some rather large sprites, and I want the hotspot for the sprite to not be at the very bottom of the sprite.

To clarify, if you click using WalkTo on a spot, I want the character to walk to the spot, but they end up higher than I want them to be, because the bottom center pixel appears to be where they base the location of the character on.  Is there a way to change this?
------------------------------------
It's Gravy!

Khris

You can change the character's z coordinate. If you set it to -10, the character sprites will be drawn 10 pixels further down (up? I can never remember) while the character retains their room position with regard to walkable areas and the like. Should be perfect for what you want to do.

Just put this in game_start:
Code: ags
  player.z = -10;

Wogoat

This is exactly what I was looking for, thanks!
------------------------------------
It's Gravy!

SMF spam blocked by CleanTalk