RPG item array

Get help using Construct 2

Post » Tue Jan 14, 2014 2:02 pm

I want to be able to make an item drop system where you can find items with up to 10 bonus stats.

sword
main stat     bonus stat1
main 2        bonus stat2
main 3        etc etc...

and then I want to access thos items with item lists, then selecting an item would show its stats and stuff and you could sell it/equip it

the only way I see that this can be done is with the arrays, but I was wondering if you guys had any better ideas since the arrays aren't that easy to deal with

name
stat1
stat2
stat3
bonus1
bonus2
bonus3
bonus4
bonus5
bonus6
bonus7
bonus8
bonus9
bonus10

would this be more easily done if I made an object for each item and used instance variables?
B
5
S
1
Posts: 51
Reputation: 477

Post » Tue Jan 14, 2014 2:11 pm

Hi, You should consider using xml. I just (seconds ago) put together a pretty neat example.

http://www.scirra.com/forum/topic83953.html
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
20
S
4
G
4
Posts: 132
Reputation: 4,130


Return to How do I....?

Who is online

Users browsing this forum: Mayfly and 8 guests