How do I base item stats on level on drop?

Get help using Construct 2

Post » Tue Feb 07, 2017 6:41 pm

plinkie wrote:You are probably looking to use an array inventory, complex at first but useful once you know how. Check out the manual and some tutorials on how to create an inventory from arrays. If you pick up an item that's on the ground you would then add it to a slot in the array. The array can store the stats of the item etc


Its usually better to decouple your item data from c2 objects. The c2 sprite should just be the handle that references the 'item' in the data structure, then you can pull data out for when you need it.
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,329

Post » Tue Feb 07, 2017 7:39 pm

gameglaux wrote:
plinkie wrote:You are probably looking to use an array inventory, complex at first but useful once you know how. Check out the manual and some tutorials on how to create an inventory from arrays. If you pick up an item that's on the ground you would then add it to a slot in the array. The array can store the stats of the item etc


Its usually better to decouple your item data from c2 objects. The c2 sprite should just be the handle that references the 'item' in the data structure, then you can pull data out for when you need it.


Yep I didn't really expand on the arrays after saying look at tutorials. This thread quickly became less about an inventory storage and more about assigning variables to loot items you pick up in an action RPG type game.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Previous

Return to How do I....?

Who is online

Users browsing this forum: evillair and 11 guests