Forum rules - please read before posting.

Action List Parameters Shenanigans

Hi.
I'm trying to make my player pick up trash and put it back down with action lists.
I wanted to make those trash prefabs duplicable, so naturally I used parameters in the action lists to reference its own objects each time.

What I have fundamentally is:
-"Pick up" Action List that runs when interacting with the trash object's hotspot (hold object, character animation, hotspot transform)
-"Put down" Action List that's on an Active input. (character animation, object unparent, hotspot transform)

The issue is that only one Trash object works properly. Any duplicates can't seem to use the parameters in the "Put down" action list, and it seems to affect the other trash object instead, despite having the "Set Interaction Parameters" component update correctly for each duplication.

Here's a video and some images for more clarity.


https://imgur.com/a/3xErJXY

Images are in order (The prefab, the inspectors for each object from top to bottom, "Put down" action list, "Pick up" action list)

I'm not sure what I'm missing and I've been staring at the problem for too long so I wanted some clear eyes to help.

Unity 2022.3.16f1 (LTS)
AC v1.82.1

Comments

  • How/where are you assigning the runtime parameter values for the "Put down" ActionList?

    The values you assign to "Pick up" won't be shared by "Put down" automatically. Typically you'd solve this by having "Pick up" end with an ActionList: Run Action, have it reference "Put down" using the "Set Parametrs Only" command. You can then transfer the values from one to the other - so that the values are then set in advance of it actually being run.

    To avoid the "Put down" list being able to run prematurely (i.e. while the Player is not picking anything up), you should also disable the Active Input list by default, and then have "Pick up" also run an Input: Toggle active Action to enable it, disabling it again within "Put down".

  • Oh yes! The "Set parameters only" is what I was missing. Thank you very much!

    And yeah I already had various variable checks and stuff to keep the action lists from running when not needed. I just temporarily removed them for testing and clarity.

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.