Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Destroyer on Sat 11/07/2009 13:16:01

Title: function room_FirstLoad() is not work
Post by: Destroyer on Sat 11/07/2009 13:16:01
Hi all!
I have a small problem:
I have this script in room 1 room script:

function room_FirstLoad()
{
Wait(200);
player.ChangeRoom(2,70,120);
}
And it´s not working. Its have been workin on my other game but no this game.


What´s wrong?

//sry my bad english
Title: Re: function room_FirstLoad() is not work
Post by: Matti on Sat 11/07/2009 13:20:35
You want the character to change the room while he is entering one? This doesn't make sense at all. Room_Load means that the room is loaded and what you write down there happens before the fade-in. Changing the room before the room is loaded could cause some problems, yeah.

What are you trying to achieve?


EDIT: Okay, you use the First_load, which isn't before the fade-in, but still is doesn't make sense.
Title: Re: function room_FirstLoad() is not work
Post by: GuyAwesome on Sat 11/07/2009 13:32:54
What's stopped working about it? Is it possible it's NOT the first time the player has been in that room? Try adding some other command, like a Display to see if it's running at all, or moving it to room_AfterFadeIn.

As Mr Matti said, what's the purpose? I'd guess it's an intro splash screen kind of thing? (Display your company name, before going to first room or menu screen.)

EDIT:
Heh, great minds, KhrisMUC. I was just about to edit that suggestion in...
Title: Re: function room_FirstLoad() is not work
Post by: Khris on Sat 11/07/2009 13:33:17
It does if this is for some sort of title screen or the like.

Is the function properly linked in the room's events pane? Copying and pasting isn't enough.
Title: Re: function room_FirstLoad() is not work
Post by: Destroyer on Sat 11/07/2009 15:39:45
I got fixed this.
I opened my other game and i made the game to it.

//Sry my bad english

In Finnish:
Sain korjattua ongelman.
Korjasin sen siten että aukasin toisen AGS pelini ja tein pelin sen päälle.