Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: miguel on Sat 10/05/2003 17:08:29

Title: npc x,y positioning
Post by: miguel on Sat 10/05/2003 17:08:29
when moving a npc to a diferent room is it possible to set it´s X,Y positioning?
Im sure it is but I couldn´t find script commands for that;
thanks
Title: Re:npc x,y positioning
Post by: Barcik on Sat 10/05/2003 17:13:30
you can always use the direct character variables:
character[charnumber].x=12;
Title: Re:npc x,y positioning
Post by: miguel on Sat 10/05/2003 17:16:03
I don´t understand,
I saw NewRoomEx on the help files but it only applyes to the player char
Title: Re:npc x,y positioning
Post by: RickJ on Sun 11/05/2003 04:26:09
There aren't any script commands.  You just need to manipulate the character's gobal variables directly.  So you need to do the following:

StopMoving(NPC);
character[NPC].room=room_number;
character[NPC].x=xposition;
character[NPC].y=yposition;
Title: Re:npc x,y positioning
Post by: miguel on Sun 11/05/2003 11:11:07
now I get it Barcik (I´m a bit slow) and thanks (again) RickJ!