Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Volcan on Sun 18/11/2012 21:11:55

Title: object's positions from player's position (solved)
Post by: Volcan on Sun 18/11/2012 21:11:55
I'm working on a game where a witch throws a spell into something.

How to get Object's position from player's position?

AGS help file gives me headache.
Title: Re: object's positions from player's position
Post by: Gilbert on Mon 19/11/2012 01:43:09
Something simple as this?
Code (AGS) Select
rx = object[1].X - player.x;
ry = object[1].Y - player.y;
Title: Re: object's positions from player's position
Post by: Volcan on Mon 19/11/2012 22:53:18
Thanks Iceboty V7000a.

It works!