Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 09/03/2004 10:22:59

Title: Moving Non Player Character To New Room, But Set Location
Post by: on Tue 09/03/2004 10:22:59
Hello,

  I May be blind, but I've done the tutorials read every Text Script Function in the manual, but I may unable to determine how to move a "Non Player" character from one room to the room where the "Player" Character is, but at a certain co, ordinate.  I can't use the "Move Character" function, as the player is not on the current screen, and when I use the function, as such "character[1].room=16;", the player appears on the required screen, but not in the place I want it to be.  Can any one let me know of a function to do this I might be missing or how to do this.  I have another question, but I will leave that to later, as I just found another function to test first of all.   ::)
Title: Re:Moving Non Player Character To New Room, But Set Location
Post by: Timosity on Tue 09/03/2004 10:34:21
Try

character[NPC].x=100;
character[NPC].y=100;

change the coordinates to what you like, that should be what you're looking for

~Tim
Title: Re:Moving Non Player Character To New Room, But Set Location
Post by: on Tue 09/03/2004 21:16:20
Thanks for that mate, that did the trick.  I knew it had to be something simple, just couldn't find it any where. :D