function room_FirstLoad() is not work

Started by Destroyer, Sat 11/07/2009 13:16:01

Previous topic - Next topic

Destroyer

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
En tiedä olenko outo, mutta toivottavasti te ymmärrätte.
En tiedä olenko myös ärsyttävä. Toivottavasti pidätte minusta.  =)

Matti

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.

GuyAwesome

#2
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...

Khris

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.

Destroyer

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.
En tiedä olenko outo, mutta toivottavasti te ymmärrätte.
En tiedä olenko myös ärsyttävä. Toivottavasti pidätte minusta.  =)

SMF spam blocked by CleanTalk