Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Strange behaviour  (Read 2867 times)

0 Members and 1 Guest are viewing this topic.

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Strange behaviour
« 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.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Strange behaviour
« Reply #1 on: February 06, 2008, 04:25:15 PM »

The caption display is completely scripted and handled in script\game_loop.script. So perhaps you should add some hiding code right there.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Re: Strange behaviour
« Reply #2 on: February 07, 2008, 10:37:32 PM »

Great Mnemonic! Now everything seems to work fine.

Great WME!

Thanks for all.
Logged
 

Page created in 0.035 seconds with 20 queries.