Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AndersM on Fri 18/07/2003 11:43:17

Title: Character in room?
Post by: AndersM on Fri 18/07/2003 11:43:17
What's the script code for making a character appear in a room if I don't want to use the 'start in room:' -comand on the character-screen?
Title: Re:Character in room?
Post by: scotch on Fri 18/07/2003 12:06:23
For the main character you want to use NewRoomEx(room,x,y)
or for any other character you could do
character[charid].room=roomnumber;
and to set it's x and y coordinates
character[charid].x=xnumber;
character[charid].y=ynumber;

the x and y coordinates can't be changed when the character is moving by the way, so it is sometimes a good idea to use
StopMoving (CHARID); before you try to change them.
Title: Re:Character in room?
Post by: Synthetique on Fri 18/07/2003 14:05:04
remember that you have to have the active character in the active room.. just hide him/her/it if you want to.