Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: davej on Sun 07/03/2010 10:45:25

Title: how to join rooms (SOLVED)
Post by: davej on Sun 07/03/2010 10:45:25
hi,

ive made about 10 rooms some are playable and the others are cutscenes how do i join them all together?

and also how do i get the game to start in the first room which is a intro scene and i dont need the charcter there
Title: Re: how to join rooms
Post by: Apocalyptic on Sun 07/03/2010 11:08:13
to join rooms: at the end of cutscene script. say player.changeroom(room number, x, y); you can set the player to be outside the room. then he wont be in it. if you want the character to walk off the edge of a room to go to the next. the go to the room and under events select walks off edge the put the changeroom command in there.
see manual: http://www.americangirlscouts.org/agswiki/Character_functions_and_properties#Character.ChangeRoom

to choose starting room: under general setting you can look for start the room to start in option
Title: Re: how to join rooms
Post by: Ali on Sun 07/03/2010 14:11:00
Also, you can set "Show Player Character" to false in a room's properties. Then you can send the character to the room to play the cutscene, but we won't see the main character.
Title: Re: how to join rooms
Post by: davej on Sun 07/03/2010 15:12:00
thanks guys for the help both of your suggestion have work out great

but ive got one problem i need the charcter to have an object in his invetory before he can enter thorugh a hot spot which leads to another room and if he does have the object then he can not go through.

anyon eknow how to do that
Title: Re: how to join rooms
Post by: Crimson Wizard on Sun 07/03/2010 15:24:22
davej, sorry to say this, but you really should RTFM... sorry again  ;D

Back to your question though, there is such thing as conditions. You write something like:


if (player.HasInventory(ItemNameHere))
{
  player.ChangeRoom(bla bla bla);
}


Ofcourse some details may be different depending on particular situation.


Title: Re: how to join rooms
Post by: barefoot on Sun 07/03/2010 15:26:20
You need to assign a function (condition) for if the player HasInventory DO THIS Else DO THIS

EG


{
 if(player.HasInventory(igun))
 {
   Display("You go back into Al's Diner");
   player.ChangeRoom(5, 153, 393);
 }
 else
 {
   
    Display("You have'nt got your gun yet!");
 }
}



Obviously you need to amend the above code to what you want to happen..

This is all in the Manual..

barefoot
Title: Re: how to join rooms
Post by: davej on Sun 07/03/2010 15:59:32
thanks barefoot u da man