How do I add description for every item in my inventary

0 favourites
  • 5 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hello,

    I made this inventory without arrays based on another tutorial.

    I add:

    + Action when the inventory is full

    + Platform dropping function

    (If someone want a tutorial, I could do it)

    Now, my doubt (I uploaded the .capx)

    I want you to help to add a description for every item when my mouse or something is over this item. I mean: When the apple is in the inventary and my mouse is over the item (While it is in the inventary (the item is an animation in fact)) show the description. Any ideas?

    Thanks so much

    (sorry for my english )

  • I took a look at your program and I added an instance variable to your object and an event to move and display text when that object is tapped. Since your example has a filled slot animation rather than moving the item, this only works when the item is clicked before it's moved. Since you chose to use the "touch" feature, there is no "mouseover" event and I made the event to act in a manner appropriate to a touch interface.

    However, I want to make some big recommendations on to how you're handling this:

    * Make your apples and pears separate objects. You can add them to a family so you can change your events so when the player collides with a member of the family it picks them up.

    * Rather than have a separate sprite for a box with an apple or pear in it, move the object to the box. This simplifies a lot of the events, removes the need for most of the instance variables, and simplifies the need for assets. This way you'll only need 2 sprites for the box (empty and the highlighted one) and you could use an arbitrary number of objects as pickups.

  • hey! Thank you so much, but that wasnt what I want, I wanted the description when the object is in the inventory.

    Thanks for the recommendations, I tried to make what you say, but:

    If I make 2 separate objects, when I make the evento to move the family item to the box, all the obejcts are move to the box and not only the object i colliding with. I dont know how to do this =S!

    Thanks again anyway! Mylon

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you create your event you need to "pick" the object to make sure you're using the right one.

    I updated the project file to show you how to move the objects around and reduce the number of events and required.

    Unfortunately I'm running into the very same problem of picking the right inventory box so I can't quite figure out how to mark one box (and not all of them) as full to prevent picking up more than 2 items at once.

  • OH! ok, thank you so much for your help Mylon!

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