PlaySound/Wait in my Inventory window makes it disappear -- why?

Started by Akril15, Wed 03/11/2010 05:30:23

Previous topic - Next topic

Akril15

Hello,

My game's inventory is displayed in a pop-up window, and there are a few points in my game where I want sounds to play when the player interacts with inventory items in a certain way. However, whenever I try implementing a PlaySound or Wait command, my inventory window will disappear and won't reappear until the sound or wait time has stopped. I've searched the manual and the forum, but haven't been able to find out why this is happening or what I can do to fix it. Is there any way I can get around this problem?

Thanks,


-Akril

Khris

In General settings -> Visual is a setting called "When player interface is disabled, GUIs should".
This is probably set to "Be hidden"; just change it to "Display normally".

Wait() is a blocking function, i.e. the player interface is disabled during the wait. I'm wondering about the sounds though, PlaySound() alone shouldn't disable the interface.

Akril15

All right, that fixed my problem. At first I was afraid that changing that setting would cause some problems with my other GUIs, but a couple of strategically placed SetGameOption commands in my open inventory/close inventory sections took care of that inconvenience easily.

Thank you!

SMF spam blocked by CleanTalk