Author Topic: another inventory question  (Read 3122 times)

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
another inventory question
« on: 2006-01-17, 08:03:05 PM »
sorry for all the new topics, but would there be a way to have a function check the amount in an inventory item, then add that amount to another inventory item? maybe through some sort of global function, i'm not sure..
see what i need to really do is move some ofhte inventory item displays, but only for 1 map, and i have a feeling that this would require scripting, so i thought of "exchanging" inventory items, then just have the new items in different spots. i have a large boss health bar (because its my final boss), and it spans hte width of the screen. its partially so big to intimidate the player (other boss bars are only ~ 1/2 the screen), and partly because while other boss's healths are at 100, this one will be at 500, so a samll bar wouldn't really give as good of a display
« Last Edit: 2006-01-17, 08:06:38 PM by billybob884 »
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

GameDeveloper

  • Guest
Re: another inventory question
« Reply #1 on: 2006-01-17, 08:06:31 PM »
Well, this seems pretty easy enough.  you could have a global function on the map that is only activated if you have the amount of items you want checked.  Whe you go to set what that global function does, just make it alter inventory and change the value of the other inventory item...

If you'd like the effect to be reset, you could just make it remove the checked amount of inventory items, so that the player must get back up to the desired amount in order for the global function to work. [let me know if this didn't make sense]

EDIT: Oh, I see that you just edited that post, which rendered my help useless.

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: another inventory question
« Reply #2 on: 2006-01-17, 08:52:08 PM »
ok, that worked, but i had to make several of the function "moving" the score, because by that point in the game your score is going to be an estimated 9000pts

--edit--
no your suggestion worked, i just had to modify it a little
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy