Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Wogoat on Fri 28/12/2012 07:35:57

Title: Changing Hotspot of sprite
Post by: Wogoat on Fri 28/12/2012 07:35:57
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?
Title: Re: Changing Hotspot of sprite
Post by: Khris on Fri 28/12/2012 09:04:48
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) Select
  player.z = -10;
Title: Re: Changing Hotspot of sprite
Post by: Wogoat on Fri 28/12/2012 17:45:49
This is exactly what I was looking for, thanks!