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: Inventory problem  (Read 3938 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Inventory problem
« on: September 05, 2007, 10:50:24 AM »

Hi - me again  ;D

Ok, I waited before posting this, but I couldn't solve the prob.

Basically, I have a variable, InventoryOn, which when set to false, prevents the inventory from fading in. This works ok for instance on my initial main menu scene. But in one scene, I have a window that loads to display those keypad numbers i mentioned in another thread, and so in the scene_init script of this scene, I set InventoryOn to false and then load the window for the keypad numbers.

But, the inventory still shows up in this scene, even though I've set InventoryOn to false. I don't GoSystemExclusive with the window because I need to interact with the scene behind to push the keypad buttons.

Any ideas? I need the inventory not to come up because I display the window in the same place as the inventory.
Logged

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Inventory problem
« Reply #1 on: September 05, 2007, 12:59:26 PM »

Hi,
    I did this in my project so that the INVENTORY did not show.

Put this in Game_Daemon.script

// display the inventory window
var InvWindow = Game.GetInventoryWindow();
  if(Game.Interactive && Game.MouseY < 20 && !Game.ResponsesVisible && !WinMenu.Visible && Scene.Name!="scenename" && Faded==false)

  {
     InvWindow.FadeIn();
}


Hope this helps, worked for me

  else if(Game.MouseY > 140  || Game.ResponsesVisible || !Game.Interactive && Faded==true)
   {
     InvWindow.FadeOut();
}   
Sleep(20);
}
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Inventory problem
« Reply #2 on: September 05, 2007, 05:44:37 PM »

But, the inventory still shows up in this scene, even though I've set InventoryOn to false. I don't GoSystemExclusive with the window because I need to interact with the scene behind to push the keypad buttons.
Then perhaps the condition using the InventoryOn variable isn't perfect and misses some possible combinations..?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Inventory problem
« Reply #3 on: September 06, 2007, 02:46:24 AM »

SBOVIS:
That's the code I already have.

Mnemonic:
I checked and checked again but couldn't find any instance of the variable being reset or anything - it was simply set to false in the scene_init script the same way as it is for my main menu scene - one works, the other doesn't, and the only difference is that in the scene in which it doesn't work, I'm loading that window.

In the game_daemon script there are about 4 conditions that must be met before the inventory will show, and this variable being set to true is one of those conduitions. So if it is set to false at any time, surely, the inventory should not show, regardless of the state of the other conditions...?

Anyway - I actually changed the way I was doing things and loaded the window when an inventory item is used instead, and then set the variable to false, and now it seems to work. But I still can't see any reason for it not to have worked the previous way. I'm still just setting that same variable to false.

But as I say: computers do whatever they like, whenever they like, and for whatever reason they like.  ;D
« Last Edit: September 06, 2007, 02:48:52 AM by TheDerman »
Logged
 

Page created in 0.042 seconds with 21 queries.