Forum rules - please read before posting.

Sanity Check - Inventory 'Drop' ActionList & Parameters

edited March 1 in Technical Q&A

Hello again,

Just wanted to check there wasn't a better route to this, as still wrangling parameters in my head.

Many items in my game can be picked up and dropped. I've setup my game to use a shared 'take' action list (using a parameter to pass the game object into an Inventory > Scene Item action).

But, I'm trying to streamline the 'drop' action.

I have an action (in a new 'drop' category) which calls a generic 'Drop action' (using parameters) via a specific ActionList:Run > Set Parameters & Run. Each inventory item uses this specific action list to set the correct Inventory item for each 'Drop'.

Is there a way to skip the specific ActionList:Run? I'm thinking the 'Set Inventory Interaction parameters' component is the key, but can't seem to work out where to apply it correctly. When added to the prefab it doesn't seem to update the parameter correctly, perhaps due to the sequencing of events.

Happy to go any route, just trying to find the most efficient before I start scaling up across multiple items.

Many thanks AC people,

Daniel

Comments

  • Is this part of the Item's own set of Interactions?

    Set Inventory Interaction Parameters will take effect before the Interaction itself, provided that it's already present in the scene.

    However, it also requires the specific Item to be assigned - since this is needed for it to "know" which Interaction it's to run for.

    If you're looking to run the same ActionList for all Item "Drop" Interaction (but with the specific Item passed to it), don't run anything from the Interaction itself (i.e. define it, but leave it empty), and then use the Events Editor (top toolbar) to create an Inventory: Interact event.

    Have this event auto-create its own ActionList, and it'll then provide an Inventory Interaction parameter, as well as an Integer parameter that represents the ID of the Interaction's Icon. You can filter this down to your Drop interaction by beginning the ActionList with an ActionList: Check parameter Action. If the ID matches your Drop Interaction's ID, you can then run the logic that drops the Item.

  • Thank you again Chris, you are a living legend.

    I'll look into Inventory: Interact (something I hadn't realised existed), and hopefully find the best solution without bothering you again!

    Daniel

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.