How do I use a Textbox for a simple Inventory

Get help using Construct 2

Post » Sat May 09, 2015 7:36 pm

Hi Guys

So, i've been Playing around with Construct today and had this crazy Idea:

What if you had an Inventory which displays only one Item at a Time. Could also be for switching Weapons with a Scrollwheel for Example. The Textbox came to mind, which i never really used so far but it kinda works so far except that i don't really get the Expressions of it and am not sure how far you can go with it. The basic idea would be:

You got a hidden Textbox (outside Layout) and an Inventory Slotsprite (or different Weapons on your Character):

User Picks up Key
Textbox add Key as a String
User presses Keyboard Key to switch the active Inventory Item (from Key to Bottle and so on)
Inventory goes to Animation Key of the Inventory Sprite (The Animation names correspondent with the Textbox String)
If Animation = Key and Player is overlapping Door plus pressing Enter, delete Key from Textbox

Well, it works actually and is pretty neat exceeept:

-I didn't figure out a way to delete a Text from the Textbox. I only found how to remove an ItemID but depending on which object the player picks up first etc. this can vary and is not that useful i think...

- I don't know if and how you can control the Textbox. I mean the basic up down arrow keys are working but it would be neat if those were ignored and you could cycle through it with your spacebar key or the mousewheel or something.

What do you think? Anyone ever tried this?
Making Purgatory - A Horror Adventure Game - www.joelmayer.io/purgatory
B
23
S
9
G
2
Posts: 149
Reputation: 2,625

Post » Sat May 09, 2015 8:42 pm

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: 788
Reputation: 3,788

Post » Mon May 11, 2015 7:36 pm

I know that would be the standard way to do something like this probably it's just that i think the List Object could be much more useful if more actions would be added to it but yeah, it was just an idea :)
Making Purgatory - A Horror Adventure Game - www.joelmayer.io/purgatory
B
23
S
9
G
2
Posts: 149
Reputation: 2,625


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests