In my game, I have a table on which I can drop a specific item type. The player has to drag and drop the item from his inventory onto the game object in the environment, and that will trigger a "Drop" Event Interaction on this game object. Right now, since I selected "1" as "quantity" in the Event Interaction component properties of the Unity Inspector, ORK checks if there is at least 1 object of the specified type in the inventory and triggers the event if so.
However, what I'd like to achieve is to trigger the event as soon as the player drops at least one item of the specified type on the table and then, display the quantity dialog to have the player choose the quantity he wants to drop.
I thought there would be an Event node for that, but I failed to find it... I also checked the Item Collectors stuff, but it didn't work neither. Can somebody help me on this?
Thanks!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Now, I try to standardize my event so it can work with different Drop interactions. I thought I could use a float object variable on the Event Interaction game object, with the ID of the dropped object and use the Select ID node to get the corresponding item. It works quite well, but it requires me to add this (redundant) object variable for each Drop Event Interaction. I wonder if there is a more direct way to pass the item selected as the "Dropped object" in the Event Interaction component to the event... I could then reuse the same Event for most of my drag and drop interactions.
Maybe I should run a C# function that would detect the type of the current Event and, if it's a Drop type, pass the ID of its dropped item to a global ORK variable that could be fed back into the Select ID node? Is that possible? Any better solution?
Thanks again!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!