edited January 14 in ORK Support
In my game, I drag and drop items on objects in the environment to use items on those objects. Only specific items can be dropped on specific objects of the environment. You can't simply drop items on the ground for no purpose. You can, however, drop items on your teammates to give this item to him/her. To achieve this, I thought I could use a "Drop" Event Interaction component on the environment objects that can be used with specific items. The problem is that if I drop an invalid item on an environment object, it shows the "give" dialog box, like when I give the item to a friend. What is weird is that my items have "Dropable" unchecked and my menu has its "Drop to World" setting unchecked too.

So, what I need is when I drop the wrong item on an object, it is simply returned to the inventory.

How can that be done?

Also, I have an issue with Item requirement checks. In the Requirements section of Items setup, I check a global variable condition. When I play, the first time this condition is false, the item becomes unusable (as expected), however, when I set the ORK global variable to true again, the item stays in its unusable state and there is no way to make it usable afterwards.
Post edited by ArsMagika on
  • Are those interactions also combatants?

    Can you post the details of the variable condition from your requirements? Also, maybe you've enabled checking object variables?
    Generally, the requirement check is done whenever the item is displayed somewhere (e.g. a menu) or you try to use it, i.e. if the variable condition is set up correctly and valid it should be usable, unless something else blocks the use.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 14
    No, the interactions I was able to give items to were not combatant. I was able to give an item to a door! :)

    As long as an object has an event interaction component, I can drop items on it and the items disappears from the inventory.

    As for the item requirement refresh issue, I made some more tests this morning, and I discovered I was able to make them refresh if I click on another (usable) item of the inventory menu. This menu is always shown at the bottom of the interface, but maybe it goes out of focus and then the items it displays are no more refreshed? How can I make sure the inventory menu always stay in-focus? Or... maybe I could try to refresh the menu each time I change the variable? I'll test that!

    Thanks!
    Post edited by ArsMagika on
  • edited January 14
    Concerning the issue with items refresh, it works when I force-refresh the menu each time I change the variable. So, that's great!

    However, the issue with giving items to doors and such is still there... I also realized that if I drop an object on a "Drop" Event Interaction that doesn't match the object I drop, it triggers the "Give" pop-up menu as well...

    I'd like the Give" pop-up menu to trigger ONLY when I drop an item on a combatant from the player active group, not on enemy combatant and not on game objects with an Event Interaction component. And when I drop the wrong object on game objects with a Drop Event Interaction, I'd like the object to be returned to the inventory as it is the case when I drop an object anywhere else in the environment (since my objects are not "dropable").
    Post edited by ArsMagika on
  • edited January 14
    Yeah, the inventory menu is not refreshed on variable changes, only on inventory changes (e.g. adding or removing an item).

    I'll look into the drop interaction, it's been some time since I last used them, might need some love :)

    Edit: Alright, tested it and it works fine here.
    The give popup is only triggered on my end if I drop it on a combatant - maybe there is some UI or collider (also used as triggers) that are connected to a combatant between the screen and the interaction?
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 14
    So, I found the issue. If I create a cube with a collider and an interaction drop event at the root of my scene, everything is fine and if I drop anything other than the item specified in the event, it returns in the inventory as it should.

    But... as soon as I parent the same cube to an empty game object, then I can drop any item on it and it will be lost.

    I'm pretty sure this is a bug, isn't it?

    I could circumvent the issue by unparenting all the interactive items from my scene, but it would surely create an organizational mess...
    Post edited by ArsMagika on
  • I'll do some tests, could be a bug.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.