Inventory system

Get help using Construct 2

Post » Mon Oct 21, 2013 5:33 pm

Hi guys, this is my first time asking something on the forums.

I would need some help with an easy inventory system:

Example

I've placed an example of what I got so far, but not sure if it's correct.

My idea is:

Currentarray position -> on key pressed -> move to currently equiped
(This should change some global stats for the player)
Grey block will be a highlight selection

I hope someone can help me, if you need more information please let me know. Glenn2013-10-21 17:59:40
B
8
S
1
G
1
Posts: 4
Reputation: 1,466

Post » Mon Oct 21, 2013 8:58 pm

http://s000.tinyupload.com/file_uploaded.php?file_id=14146626807770195439&del_id=03739523491159535509&gk=cisco

Feel free to ask questions
You will probably need a function to swap items, when you get more slots. Which item is in which slot could be saved in the array, so it is not a huge problem to expand it (I think).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Mon Oct 21, 2013 9:12 pm

@mindfaQ

Thank you, and how would I be able to do it for the same below those?
For example: When I press arrow down I can do the same for weapons.
B
8
S
1
G
1
Posts: 4
Reputation: 1,466

Post » Mon Oct 21, 2013 9:26 pm

set up a vertical cursor variable, generate the weapon sprites similar to the cloth sprites (give them an id variable, give each graphic a separate frame), then in the keyboardevents:

on x pressed:
-verticalcursor = 0
-- the current events as subevent
-verticalcursor = 1
-- the current events as subevents, but change clothes to weapons and clotharray to weaponarray

Or just continue to work with the cursorarray and cloth-sprite.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Oct 22, 2013 4:12 pm

@mindfaQ

I'm a total newby when it's about arrays

Could you help me with it?
B
8
S
1
G
1
Posts: 4
Reputation: 1,466

Post » Tue Oct 22, 2013 4:31 pm

Two examples here using dictionary instead of array.
https://www.scirra.com/forum/can-someone-give-me-more-info-On-dictionarys_topic78473.html

You can also use array instead of dictionary.

more links:
http://www.scirra.com/forum/simple-inventory_topic64829.html

http://www.scirra.com/forum/seemple-eenventory_topic75302_post451380.htmlDUTOIT2013-10-22 16:37:10
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Tue Oct 22, 2013 4:55 pm

@DUTOIT Thank you I will look into it when I'm back from the gym
B
8
S
1
G
1
Posts: 4
Reputation: 1,466


Return to How do I....?

Who is online

Users browsing this forum: evillair, Rable and 7 guests