Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Davostros on Wed 02/11/2011 11:58:49

Title: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 11:58:49
Hi, i have made an scripting for an intro text sequence(Densming style) and i can't figure out how to change room after that, my character is hided on the "intro" black room (for text) and i can't figure out how to make it happend. Here is my script:
function room_AfterFadeIn()

{
   
    gStatusline.Visible = false;
    gIconbar.Visible = false;
    ShowTextCentered("Test.");
    Wait(100);
    player.RoomChange(2);
}
Title: Re: How to change Room after my intro sequence?
Post by: Khris on Wed 02/11/2011 12:06:08
It's
  player.ChangeRoom(2);
Also, if for whatever reason you typed this from memory instead of copy pasting it here and did use the proper command, please post what error message you get or what happens instead of what you want to happen.
Title: Re: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 12:09:54
Sorry i corrected too late but in my script it was RoomChange, but however it says "RoomChange is not a public member of..."
Title: Re: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 12:12:17
And oh yes sorry it's not just copied, my RoomAfterFadeIn comes from the Room events.
Title: Re: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 12:25:45
Iv'e been slow on the trigger, tryed it with ChangeRoom and now it says

"Error:prepare_script: error-18( no such function in script) trying to run 'room_Leave' (Room1)"
Title: Re: How to change Room after my intro sequence?
Post by: pcj on Wed 02/11/2011 12:34:54
Sounds like it's performing the ChangeRoom correctly (or about to) but something in your room_Leave script is messing up.
Title: Re: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 12:43:33
Quote from: pcj on Wed 02/11/2011 12:34:54
Sounds like it's performing the ChangeRoom correctly (or about to) but something in your room_Leave script is messing up.

Well if i go to room events and click on room_Leave i haven't got any function appearing on the script. How can i modify it?  (might be stupid questions but i'm a newbie with ags  :-X )
Title: Re: How to change Room after my intro sequence?
Post by: pcj on Wed 02/11/2011 12:46:26
That's your problem.  A Room_Leave function is defined in your room's events window but doesn't exist in the room script.  You can delete the entry in the events pane (in the room editor, look for the lightning bolt and delete the entry for "Leaves room") if you're not using it.
Title: Re: How to change Room after my intro sequence?
Post by: Davostros on Wed 02/11/2011 12:50:44
Quote from: pcj on Wed 02/11/2011 12:46:26
That's your problem.  A Room_Leave function is defined in your room's events window but doesn't exist in the room script.  You can delete the entry in the events pane (in the room editor, look for the lightning bolt and delete the entry for "Leaves room") if you're not using it.
Thank you so much PCJ!  :D