Licence od 75 € Přihlásit se
DE EN FR ES IT CZ

Inventory

Toto téma je několik let staré. Některé údaje se mohou týkat starší verze Visionaire Studia. Aktuální návody

  1. · 13 years ago
    Hi!
    I have an inventory which holds 5 items.
    How can I highlight the specific item that user clicks on it? (I' ve made an active image in photoshop)
    Additionaly how can I remove the highlighted mask, when user clicks anywhere at scene with the dragged item?

    Thank you!
  2. Pracujete na hře?

    Bezplatná verze umožňuje až 25 scén na projekt. Pro více scén a pro prodej hry potřebujete licenci.

    Zobrazit licence Vyzkoušet zdarma
  3. · 13 years ago
    Are you talking about the item itself or the inventory slot?

    If you are talking about the item itself then you want to create the image for the item as an animation & then control the animation frames of the item with lua script.

    I have mentioned to the devs before that it would be more beneficial to change the current item image/animation system so that it has an active & inactive animation system same as the mouse cursor system. Hopefully it will get sorted at some point as it will make it much simpler to define active & inactive state of items.
  4. · 13 years ago
    Hmm.. First I tried with item itself but I couldn't highlight it. (thanks for LUA tip).

    So, I'm now using a highlight image, same for all inventory slots.
    When I click an item in the inventory, the specific inventory slot is being highlighted with the active image I've made.

    How can I remove this active image when user clicks anywhere at the scene with the dragged item?

  5. · 13 years ago
    Good idea... it would be very felpful, indeed.
  6. · 13 years ago
    it's not a slot per say that you are highlighting, it's just an action area.

    I would either create a table with all the names of the slots & use a for loop to reset all of them back to inactive image, or check which has active image & reset back to inactive or set a value when clicking item in a slot so you know which one to set inactive after. Does the dragged item not disappear after left clicking or right clicking anywhere on the scene?

    The best solution would be to include in left & right click actions (mouse properties) a query to see if an item is currently being held & if so set the inactive image of the inventory slot.

    P.S: it's Lua not LUA. smile

    P.P.S It seems that there is no ButtonActive table in the data structure. You may need to create a called by other action which you create a "set button inactive" action part for each of the buttons being used as inventory place holders.

    In mouse settings I mentioned earlier, add an execute a script action containing something along the lines of...
    if game:getLink(VGameUsedItem) ~= nil then
     startAction("Actions[name_of_called_by_other_action_you_created_earlier]")
    end
    

    ..the code & methods I have mentioned are theoretical!

Toto téma je uzavřené, protože tu přes rok nikdo neodpověděl. Svůj dotaz můžete položit v novém tématu.

Nové téma

Opravdu smazat tento příspěvek?