RPG Inventory.

Get help using Construct 2

Post » Mon Dec 14, 2015 6:25 am

Can't find a 'tutorial' that explains how to do this for someone lacking experience.

Looking for a simple 'English' guide on how to make the most basic inventory.

Kill monster > Drop Item > Walk Over item > Adds item to inventory.

Please don't send me a link to a previous tutorial. Asking for assistance here.
B
5
Posts: 7
Reputation: 245

Post » Mon Dec 14, 2015 8:02 am

What kind of inventory would you like?
How many kinds of objects are there?
Could you hold more than 1 of those objects?
How would the player use those objects?

There are many examples on the forum as well, did you try a forum search?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 14, 2015 8:11 am

2x2 slot inventory.
Just one for now.
Yes, and they stack on top of each other, saving inventory slots.
Run over object to pick up.

I did forum search, but alot of it directs to array, "poorly" made/worded array inventory guides.

But I am yet to find one that is worth learning from.
B
5
Posts: 7
Reputation: 245

Post » Mon Dec 14, 2015 8:27 am

yehamlg wrote:2x2 slot inventory.
Just one for now.
Yes, and they stack on top of each other, saving inventory slots.
Run over object to pick up.

I did forum search, but alot of it directs to array, "poorly" made/worded array inventory guides.

But I am yet to find one that is worth learning from.


All of them are worth learning from, even the bad ones..
They will give you understanding in how Construct2 works..

So it seems you want something like:

player on collision with ammo
- System add 1 to Global variable Ammo
- Ammo destroy

Or maybe you'd like to use instance variables on the player, but it would work the same..

All you'd have to do than is to create a visual representation of the values of the variables..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 14, 2015 8:33 am

All I am trying to do at this point is:

Kill monster then spawn object.
Collide with object adding it to inventory.
Push 'key' to view inventory and able to see object inside.
B
5
Posts: 7
Reputation: 245

Post » Mon Dec 14, 2015 8:48 am

So:

Monster on destroyed
> monster spawn object

Player on collision with object
> destroy object
> add 1 to global variable Objects

On button clicked
> text set text : "objects in inventory"&Objects

If you want to visually display the inventory, you should first make the visual display..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 14, 2015 8:58 am

Found all that stuff out on my own, but visual display? i make a sprite of the inventory layout or something?
B
5
Posts: 7
Reputation: 245

Post » Mon Dec 14, 2015 9:12 am

I don't know what you would like your inventory to look like..
Maybe you have animationframes to show how much/many of an object you have, maybe you'd like to use text, etcetera..

Simply put, something like this:

First you check if you have the object(s)
(Variable > 0)
If so you make a visual representation of that object and its value
> create object (set object visible)
> set text to Variable
else
> destroy object (set object invisible)
> set text to ""
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 14, 2015 9:16 am

nah bro you're talking a different language now, thanks anyway...
B
5
Posts: 7
Reputation: 245

Post » Mon Dec 14, 2015 9:23 am

all I want is ( completed tasks are marked as done obviously )

Kill monster and spawn object ( DONE )
Player Collide with Object add to variable ( DONE )
Open inventory display using key or mouse click ( ?? )
View Object/Variable in Inventory ( ?? )
B
5
Posts: 7
Reputation: 245

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 15 guests