Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: HAzmaT5793 on Sat 05/04/2008 19:45:55

Title: scripting problem with room change
Post by: HAzmaT5793 on Sat 05/04/2008 19:45:55
I am having a problem with a room change. I have set the game to change from room 3 (an upclose view of a locker, player invisible) to room 2 (the hall the locker is in) by interacting with a hotspot in room 3 (the locker door). Everytime I try to change rooms I get an error reading "(no such script in function) trying to run room_leave" I need help!
Title: Re: scripting problem with room change
Post by: Akatosh on Sun 06/04/2008 14:25:15
It would be rather helpful if you could show us the exact code you used to make the player change the room. But if I had to guess, I'd say you probably tried to run the room_leave function instead of player.ChangeRoom, or put some non-working code in the room's on_leave section.
Title: Re: scripting problem with room change
Post by: naltimari on Sun 06/04/2008 21:04:55
Quote from: HAzmaT5793 on Sat 05/04/2008 19:45:55
Everytime I try to change rooms I get an error reading "(no such script in function) trying to run room_leave" I need help!

I guess you manually (or accidentaly) deleted the function which was bound to the 'Leaves Room' event in Room 3.

Look in Room 3 events, there should be a function in the 'Leaves Room' event which is missing in your code. Either clear the name, or write a function with the same name.