Forum rules - please read before posting.

How can I call an action list when closing a container that is different for every container?

edited February 2023 in Technical Q&A

I'm going to use the example of a drawer but I'm planning to use this for cabinets and lockers and other types of containers. I'd like them to have unique animations but I'm not sure how to trigger them when the container is closed.

The player clicks on the drawer hotspot. This triggers an action list that animates the drawer opening via parameters and plays a sound effect. It also opens the container menu.

So far so good, but how do I do this in reverse? When closing the container menu, I want to trigger the drawer close animation and accompanying sound effect for that object. I know I can set an action list to play when closing the container menu but I don't know how to affect the same object that I opened without making an action list for each one. And then how would I assign which one to play?

Is it possible to use the same action list that opens the container and somehow wait until until container is closed before continuing the rest of the actions (the close animation and the sound)?

Comments

  • edited February 2023

    These are ActionList assets?

    One approach would be to "prime" the closing asset's parameter values, using the ActionList: Run Action's Set Parameters Only option. If you run this from within the opening asset, you can transfer shared parameter values (e.g. the Animator object) from one to the other.

    You can then delay the actual running of the asset until the Container closes. The parameter values should be retained, unless you opt to overwrite them with the Action's Set Parameters And Run option.

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.