Forum rules - please read before posting.

Checking where the items in an interaction are stored

2»

Comments

  • If I have set an Action List for combines under "global unhandled events", then an unhandled combine will trigger the selected Action List as expected.

    As instructed, after adding a Debug.Log statement here:

    if (InvItem.unhandledCombineActionList)
        {
            Debug.Log("unhandled!");
            ActionListAsset unhandledActionList = combineInstance.InvItem.unhandledCombineActionList;
            AdvGame.RunActionListAsset (unhandledActionList);
        }
    

    If I add an unhandled combine interaction only to ItemA, and then use ItemA on ItemB, "unhandled!" will be printed to the console, but no Action List will run.

    If I add an unhandled combine interaction to ItemB, and then use ItemA on ItemB, nothing will be printed to the console, and no Action List will run.

    If I add an unhandled combine interaction to ItemA AND ItemB, and then use ItemA on ItemB, "unhandled!" will be printed to the console, and the Action List assigned to ItemB will run. If I use ItemB on ItemA, "unhandled!" will be printed to the console, and the Action List assigned to ItemA will run.

  • Your code excerpt shows the bug: AC is checking the presence of ItemB's unhandled ActionList before running ItemA's.

    It should be that, in the event of an unhandled interaction, using ItemA on ItemB runs ItemA's unhandled ActionList.

    Change:

    if (InvItem.unhandledCombineActionList)
    

    to read:

    if (combineInstance.InvItem.unhandledCombineActionList)
    
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.