Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 02/01/2005 22:13:19

Title: NPC walking off screen to different room [SOLVED]
Post by: on Sun 02/01/2005 22:13:19
Hi guys

I'm having trouble making an NPC walk to the edge of the screen and then appearing in the next room.

Right now the NPC vanishes into the next room before getting the chance to walk.

I need to script "wait for move to finish".

Code is as follows:

// Move shop girl
function dialog_request (int para) {
if (para == 1) {
MoveCharacter (SG, 317, 161);
NewRoomNPC(SG,1, 251, 137);
}
}

Thanks!
Title: Re: NPC walking off screen to different room
Post by: strazer on Sun 02/01/2005 22:17:02
QuoteI need to script "wait for move to finish".

Commands that pause the script/game while they are being executed are called "blocking" in AGS.
Use the MoveCharacterBlocking function.
Title: Re: NPC walking off screen to different room
Post by: on Mon 03/01/2005 23:42:33
Thankyou!!!!!!
Now I understand.

:)
Title: Re: NPC walking off screen to different room
Post by: strazer on Mon 03/01/2005 23:58:10
My pleasure. :)