Possible bug when calling "NewRoom()" from the global script

Started by NavyNuke04, Mon 07/07/2003 04:40:06

Previous topic - Next topic

NavyNuke04

I've checked all my code, and I can't figure out what's going on. It seems that if I call the "NewRoom()" function from within the global script, it skips the "player enters room (before fadein)" section of the new room. It loads the new room, and it does the after fadein stuff, but apparently skips right over the before fadein stuff. None of the before fadein stuff is within 'if' statements, so I have no idea what's going on.

Any ideas?

Pumaman

Which part of the global script did you have it in? I'll look into it.

NavyNuke04

well, I want the player to be able to accomplish the same thing two different ways. Without spoiling the game, here is basically what is going on:

What works:
Use inventory item on charcter

What doesn't work:
Talk to inventory item while in inventory GUI

Both actions cause you to go to a new room, only the second clears the inventory GUI first.

Both actions go to the room like they should, only the second action seems to cause AGS to skip the 'before fadein' section of the new room's script.

NavyNuke04

CJ,

I just created a small new 'game' that shows this bug. It's online at http://www.navynuke.net/bug.zip

Start the game, and go to the inventory window using the drop down GUI. Select the key and then use it on Roger. It should go to room 2, disable both the status bar and drop down GUI's and then display a message.

Restart the game, and this time use the talk cursor on the key inside the inventory GUI. The only scripting difference here, is that it turns off the inventory GUI before it goes to room 2. For some odd reason, it skips over the 'before fadein' section and doesn't disable the 2 GUI's...

Hope this helps....

Pumaman

Hmm, interesting, thanks for that demo game.

I'll look into it.

Pumaman

Ah, it's a bug with scripts run directly by clicking on an Inventory GUI. Here's a fix - it seems to solve the problem for me, could you give it a go:

http://www.agsforums.com/acwin.zip

NavyNuke04

Great job, CJ! We can always count on you for quick responces! My game runs fine now. Thank you!

Scummbuddy

The new name... I'm shocked.  I had no idea.  

Did you get that memo about the TPS reports?
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SMF spam blocked by CleanTalk