How to change Room after my intro sequence?

Started by Davostros, Wed 02/11/2011 11:58:49

Previous topic - Next topic

Davostros

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);
}

Khris

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.

Davostros

Sorry i corrected too late but in my script it was RoomChange, but however it says "RoomChange is not a public member of..."

Davostros

And oh yes sorry it's not just copied, my RoomAfterFadeIn comes from the Room events.

Davostros

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)"

pcj

Sounds like it's performing the ChangeRoom correctly (or about to) but something in your room_Leave script is messing up.
Space Quest: Vohaul Strikes Back is now available to download!

Davostros

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 )

pcj

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.
Space Quest: Vohaul Strikes Back is now available to download!

Davostros

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

SMF spam blocked by CleanTalk