ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperCube > Help with CopperCube
FREE Inventory setup
Author Text

Robo
Guest
Quote
2019-06-28 09:11:20

After much hassle I have managed to create and save an array in CopperCube. It saves & loads back up fine also:

http://lasttrump.net/gamedev.html

I wanted to use an array as its like a table of data that can be queried and able to save many variables easily and interconnected with multiple item characteristics per inventory slot.

I am posting here for free - hope you like.
Also see a copy of my game to date showing how it works in practice.

I have it all in simple array style in one big string separated by commas. Each inventory slot has 11 different sub variables so that the whole list always has a factor of 11 elements in it.

The inventory download has the spreadsheet showing each element for each inventory slot - you can use for yourself in your game if you like.

To save use:
var data = invMe.toString();
ccbWriteFileContent('save.dat', data);

or save as normal method also as a single varaible 'invMe' if you like.

To reload:
data = ccbReadFileContent('save.dat');
var load = data.split(",");
var invMe = load;


Enjoy.


Jeremy Wiley
Guest
Quote
2019-08-20 12:39:12

This is actually a very reliable system. Could you make a tutorial for inexperienced programmers?


doomtucan
Registered User
Quote
2019-08-21 16:24:39

can you actually use images with this for use of inventory so its not so plain?


Robo
Guest
Quote
2019-08-22 07:49:25

Re-download to get it fixed so that the sounds and images works now - just a referencing issue.

Alternatively just put the CC exe file inside another folder from where its located and should work fine then also.

A video on this...mmm if I get enough requests could do that maybe...


doomtucan
Registered User
Quote
2019-08-22 14:33:05

yes i would like a tutorial also on this!


Neo96732
Guest
Quote
2019-10-10 05:42:59

I would 2


Robo
Guest
Quote
2019-10-11 14:02:53

Ok, I will do a video on it then in the next 3-4 days...


Neo96732
Guest
Quote
2019-10-12 04:21:31

Thank you very much.


Robo
Guest
Quote
2019-10-12 06:05:17

ok - see attached video link:

https://youtu.be/u2kNmFx05uE


karmacomposer
Registered User
Quote
2019-10-13 19:05:13

Awesome!

Thank you for this. Was looking to make a inventory system.

How hard would it be to make picking up an item by pressing an action key, like "e" instead of the left mouse button (or single or double pressing on it if the game is for a tablet or phone)?

How would we add text to it, like "Water" or "Pick up water"?

Thanks.

Mike


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Forum Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   





Software: Ambiera Light Forum. © 2008-2019 Nikolaus Gebhardt, Ambiera e.U.