How do i Implement this style inventory?

Get help using Construct 2

Post » Mon Jul 22, 2013 1:40 am

Fixed. If you want I can make you an example of inventory with arrays, need some break from my current project heh.
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,314

Post » Mon Jul 22, 2013 1:45 am

[QUOTE=shinkan] Fixed. If you want I can make you an example of inventory with arrays, need some break from my current project heh.[/QUOTE]

That would be awesome if you could do that for me to have a visual,Alot of the examples on the website are lacking some stuff so i have been tryin to peice things together using multiple peoples tutorials and its kinda confusing because everyone has a different approach.I would be more than grateful to have your help with this inventory @shinkan
also thank you for fixing that link im going to check that out right now.RookieDev2013-07-22 01:45:58
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Mon Jul 22, 2013 1:54 am

Just tell me what you need - basic stuff like how many rows, columns...
You want to add items by clicking on them with mouse or overlapping by another sprite? Same type of items should stack on each other or occupy different cells? I try to comment everything in file so you could easily understand whats going on and make changes to any part of it.
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,314

Post » Mon Jul 22, 2013 2:00 am

@shinkan i will have 4 rows of 10 slots,I would be adding them to the iventory when the player breaks a block a dropped block will spawn for the player to pickup and it will be by overlapping.The same items should stack ontop of each other.You can think of this inventory like Minecraft.I say that because the way minecraft picks items up,You just move overtop an item and it automaticly goes into you inventory.I apoolgize if im not the best at explaining this in detail.If i missed something just let me know.I am making this for Mobile devices if that helps,so everything will be touch.

One main reason why i need to create this inventory is because i cant add or destroy blocks unless they are inside the inventory in the hotbar,I want to make the player dig and collect blocks instead of having them all for them from the begining.RookieDev2013-07-22 02:07:26
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Mon Jul 22, 2013 8:06 am

@RookieDev just send you a pm
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,314

Post » Mon Jul 22, 2013 10:42 am

@shinkan Thanks for improving that. I have bad habit of making simple thigs too complicated

Can you explain how this works:
self.state = 0 ? 1:0
For example what does "?" do

Could it be used for more complicated state systems. I'm sure it's already explained many times before just don't know what to search for.Katala2013-07-22 10:53:08
B
33
S
9
G
3
Posts: 517
Reputation: 5,181

Post » Mon Jul 22, 2013 11:47 am

?: is a conditional operator

It's all quite nicely explained in manual, You can find it here.
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,314

Post » Mon Jul 22, 2013 12:33 pm

Thanks I overlooked that Operators part. Have to start using these more.Katala2013-07-22 12:35:50
B
33
S
9
G
3
Posts: 517
Reputation: 5,181

Previous

Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, kiko2015, Momio and 11 guests