Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Fizz on Sat 17/07/2004 16:11:56

Title: NewRoomEx for npc´s?
Post by: Fizz on Sat 17/07/2004 16:11:56
Hi!

A really simple question, but I feel like Ive tried everything, and I still cant make it work...

see, the thing is, in the intro for my game, theres an NPC giving the player character a tour of the town. I need for both of the characters to get to the next room at a specific point (the sidewalk), but I just cant make it work... ive tried walking the npc to a region that had player walks on to region / NewRoomEx, but then the game crashed... what am i supposed to do?

thanks in advance, I feel kind of stupid asking, hehe, but you know... I need to know!

cheers
-Patrick
Title: Re: NewRoomEx for npc´s?
Post by: Minimi on Sat 17/07/2004 18:29:48
Well, I'm not completely sure, but NewRoomEx, works only for the player character. Just use NewRoom command, and after that set the coordinates for the NPC, in the other room.
Title: Re: NewRoomEx for npc´s?
Post by: Wolfgang Abenteuer on Sun 18/07/2004 00:10:07
Minimi is correct - NewRoom and NewRoomEx are for the player character only.Ã,  For NPCs, just use the character variable character[CHARID].room = #.Ã,  When the NPC walks onto the region, simply use character[CHARID].room = # (where "#" is the room number you want the NPC to appear on).Ã,  If you want to put the NPC in a specific place on the new screen, then use character[CHARID].x = # and character[CHARID].y = # immediately after the [CHARID].room line and BEFORE the NewRoomEx command (or whatever command you use to make the player change screens).Ã,  Once the new screen fades in, the NPC should be in that room at the coordinates you specified.

~Wolfgang