11
« on: February 05, 2008, 05:39:18 PM »
Hi all,
I'm going to try to explain you a behaviour that is very strange for me. I've a poor English so I apologize for the errors I could make during the "explanation".
I've a personalized inventory window. When the player press tab key, the inventory window is shown. The strange behaviour is that if the player has the cursor over a interactive region (for example a sunken ship) the active cursor is a spyglass and the global variable WinCaption has the text "Look at sunken ship" and is visible at the bottom of the screen. In this moment if the player press the tab key, the inventory windows is shown and the cursor is again the default one but WinCaption is still visible. I realize that the cursor changes cause I set it on the event MouseLeave in the script attached to the sunken ship. If I set WinCaption.Visible = false in the same event MouseLeave in the sunken ship script everything works fine (inventory windows visible, default cursor, and WinCaption hide), but If I set
WinCaption.Visible = false in the event KeyPress in the game.script (instead of setting it in the MouseLeave event in the sunken ship script) sometimes everything works fine but sometimes (an apparently random behaviour) the WinCaption is still visible when the inventory window is shown.
I hope you can understand this mess I've called explanation. Any suggestion? Is there any way to hide the WinCaption in the game script or I have to do it in MouseLeave event in the scripts attached to every interactive element I´ll have in the game?
Thanks in advance for your support.