inventory system

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
B&CEntertainment
Posts: 1
Joined: Wed Aug 26, 2009 6:22 am
Contact:

inventory system

Post by B&CEntertainment » Wed Aug 26, 2009 6:40 am

Just starting out with the software trial; I'm considering RunRev as an engine for a new FPGA point and click my studio is working on, similar to Alida. I'm having a little trouble finding a way to code a sustainable inventory system throughout the game. I've been talking briefly with Alida's creator about the scripting but I was wondering if somebody on the forums might have an idea on how to adequately set this up. Essentially all I am looking to create is a box on the peripheral of the screen that contains thumbnail views of items currently in the player's possession. The player should be able to pick up items throughout the game world, at which point they shrink to fit inside the Inventory display, and take them with him as he navigates from screen to screen. He should then also be able to remove the item from his inventory so that it may be used elsewhere with another designated item. Any help would be appreciated.

I'm still monitoring my 30 day trial of RunRev and I have to say, regardless of whether this product is top quality or not, I'm dismayed at how diminished the online community is in support of this product. There are hardly any tutorials, tips, or general advice to be found anywhere and even the official forums are surprisingly lacking in thorough information (type in "actionscript" in google and see what comes up, then do the same with "runtime revolution", you'll see what I mean) . Furthermore, the tutorials and literature packaged with the trial is sparse and vague at best. I'm unsure of how effective the software really is because there simply isn't enough documentation to really show me what its capable of. Its really the only thing stopping me from going ahead with RunRev for our engine.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Aug 26, 2009 8:46 am

Dear B&CEntertainment,

The nice thing of Revolution in this case is that objects such as fields and buttons are nearly physical. You can drag any object to a particular area, or even to a different window, and hence automatically know what is in inventory. To get a list of items in that area, just do something like this:

repeat with x = 1 to number of buttons
if the loc of btn x is within the rect of grc "Inventory" and the cInventory of btn x is true then
put the short name of btn x & cr after myList
end if
end repeat
-- do something with myList here
If you want to save player information between sessions, it is probably best to use keep the play field together with the inventory and other dynamic windows in a separate stack file and save this stack file when the player stops playing.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Games”