Author Topic: Inventory items and such.  (Read 4926 times)

Uhfgood

  • Regular
  • **
  • Posts: 26
    • AOL Instant Messenger - Uhfgood
    • View Profile
    • Indie Flux
Inventory items and such.
« on: 2006-01-25, 01:57:26 PM »
I'm going through the tutorial, and during the course of playing it I got the inventory items.  However now whenever I play the game I still have the items.  I must have done something that saved the fact I got the inventory items.  Any help here?

Keith
Keith Weatherby II
http://www.gamesafoot.com
Uhfgood -at- verizon -dot- net

Dr Obvious

  • Regular
  • **
  • Posts: 53
    • View Profile
    • http://www.drobvious.net
Re: Inventory items and such.
« Reply #1 on: 2006-01-25, 02:17:36 PM »
You can either use special function to subtract one or more of those inventory items using special function or you can use scripting.  Something like .InvQuantityOwned(x) = y where x is the inventory number and y is whatever you want to do to the inventory item.

Uhfgood

  • Regular
  • **
  • Posts: 26
    • AOL Instant Messenger - Uhfgood
    • View Profile
    • Indie Flux
Re: Inventory items and such.
« Reply #2 on: 2006-01-25, 02:19:41 PM »
That would be the case if during the game I wanted to remove stuff from my inventory.  But I assumed that once you exited the game it would return to it's intial state.  So once I restarted the game the items would be back on the map and not in my inventory.

Keith
Keith Weatherby II
http://www.gamesafoot.com
Uhfgood -at- verizon -dot- net

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: Inventory items and such.
« Reply #3 on: 2006-01-25, 02:21:22 PM »
check the initial amount in the inventory window., sometimes in hte map editor you can make permenent changes (i know, its screwed me over several times in the past)
"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

Uhfgood

  • Regular
  • **
  • Posts: 26
    • AOL Instant Messenger - Uhfgood
    • View Profile
    • Indie Flux
Re: Inventory items and such.
« Reply #4 on: 2006-01-25, 04:56:58 PM »
Yeah after going back through and readjusting the settings, it works.  But I don't know how they got changed.  Hopefully SGDK2 will fix some of these deficiencies (And maybe make it a bit simpler).

Keith
Keith Weatherby II
http://www.gamesafoot.com
Uhfgood -at- verizon -dot- net

cbass

  • Expert
  • Regular
  • *****
  • Posts: 97
  • script this
    • View Profile
    • Squest RPG
Re: Inventory items and such.
« Reply #5 on: 2006-01-25, 06:53:48 PM »
Maybe you had "disable player edits in map editor" unchecked in the options dialog, and got the inventory when editing a map and then saved the project afterward unknowingly.  Not sure if not cheching that option would do that since I've never unchecked it before.

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: Inventory items and such.
« Reply #6 on: 2006-01-25, 08:37:54 PM »
i believe its unchecked as a default when you first install sgdk, but not sure
"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

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Inventory items and such.
« Reply #7 on: 2006-01-25, 09:44:46 PM »
It was originally designed so that the map editor was the same as playing and editing at the same time.  However, the problem with that is if you have something that changes the state of the game that the player activates (i.e. picking up inventory or an Alter Map function (even worse)) since you're in edit map mode, it will save any changes you made to the map, including those changes made by the player activating them.  So then the "Disable player edits in map editor" option was added so that kind of thing stops happening (but you can deactivate it if you want it to still).
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory items and such.
« Reply #8 on: 2006-01-26, 10:23:08 PM »
I shake my head or chuckle every time someone talks about some particular feature being different/fixed in SGDK2.  Why?  Because in my mind SGDK2 is so incomprehensibly different from version 1 that it boggles my mind to try to compare them (although some comparisons can be made).  SGDK2 is rewritten from the ground up with a whole new design, and it's almost surprising to me that any similarities can be drawn at all.  But with that said, here's how SGDK2 will compare with respect to this particular anomaly:

SGDK2 will not have a design time environment that is similar to the run-time environment.  The file format for a project that is in-progress will also be completely different than anything that is delivered with the compiled game.  In SGDK2, when you are designing/developing a game, you will be saving your data in an "SG2" file, which is an XML file with all the sprite names and layer data and various pieces of information in it.  When you run or compile the game, it will be converted to C# source code and compiled.  The C# source code will convert all your sprite names to variable names, and the sprite data to literal arrays, and all your graphics sheets to embedded resources and all your layer data to embedded binary resources.  Then the project has to be compiled to run it.  So when you deliver your project, you will probably just be delivering an EXE file -- no bitmaps or text files or other sorts of data files.  So you see the runtime and design-time environments for SGDK2 will be very different from each other and very different from version 1.

... in case you're interested :).