How do I use a Textbox for a simple Inventory

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)