Forum rules - please read before posting.

Dynamically added ActionInventorySet no longer points to the next action in the list

edited May 2023 in Technical Q&A

I create a lot of action list dynamically (for example calling ActionInventorySet.CreateNew_Add and adding them to an action list at runtime). When adding actions to a list like this, the new action always connects nicely to the previous one in the list (an Ending is added pointing to the next action).

I noticed however, that adding actions AFTER an ActionInventorySet for some reason no longer points to the next action. I don't know what version av AC this broke in, but when I tried the previous version that my Git repo had of that file it started working again.

So when using the latest version, I now have to add this in order for the next action to connect nicely:
newInvenotryAction.endings.Add(new ActionEnd(false));

I have no idea if ActionInventorySet is the only action affected by this change, if this is by design - could you let me know which other actions are affected?

Thanks

AC: 1.77.3
Unity: 2022.2.19

Comments

  • I'll attempt a recreation. What version of AC is used in your Git repro backup?

  • I'm guessing it was the release prior to 1.77.3

  • Reproduced.

    To fix, open up ActionInventorySet and add this to the bottom of its Upgrade function:

    base.Upgrade ();
    
  • Works 👍
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.