Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: JudasFm on Thu 12/02/2004 12:05:20

Title: Problem arises with Move NPC to another room...
Post by: JudasFm on Thu 12/02/2004 12:05:20
(Okay, I know I've been posting a lot of help requests lately, but please bear with me; I've never tried anything like this before :))  Anyhoo...

Is there any way to move an NPC to another room at specific coordinates, like a player character?  Moving when the character enters the room isn't much good; he's supposed to be sitting at a table, and it looks a bit weird if he glides through a table and onto the bench.  Is there some kind of script I can add saying 'when you move him, move him here'?
Title: Re:Problem arises with Move NPC to another room...
Post by: Kweepa on Thu 12/02/2004 12:50:10
Just use

character[SITTINGDUDE].x = SITTINGATTABLEX;
character[SITTINGDUDE].y = SITTINGATTABLEY;
Title: Re:Problem arises with Move NPC to another room...
Post by: JudasFm on Thu 12/02/2004 13:44:01
 :) Thanks, that's great.  One little thing; where should I put this code?
Title: Re:Problem arises with Move NPC to another room...
Post by: Kweepa on Thu 12/02/2004 15:49:22
You can put it in the script exactly where you move the character to the new room.
Title: Re:Problem arises with Move NPC to another room...
Post by: JudasFm on Thu 12/02/2004 16:20:29
Got it!  Thanks! ;D