Forum rules - please read before posting.

OnEndActionList & Conversations - Getting called unexpectedly

Hello all,

When my player starts a conversation with a NPC I have a bit of code that checks via OnBeginActionList and OnEndActionList what Action Lists have started and finished.

For instance, it correctly registers when this action list starts:

When it gets to the 'Start Conversation' action though I'm seeing OnEndActionList being fired. Is this expected? I'd have thought the action list would still be running even if conversation options were on screen?

Thanks!

Comments

  • That would be expected, yes. For technical reasons, the ActionList shuts down temporarily while the player makes a choice.

    What you can do, however, is try checking the value of the ActionList's conversation variable at this time.

  • edited July 2019

    @ChrisIceBox Good to know it's behaving as expected. I'll try the conversation variable now and see what I can do with it. Thank you sir.

  • edited July 2019

    I get a null result on the conversation variable when checking it when the conversation choices are on screen. Does that seem correct?

  • It seems that the conversation variable is always reading null, when the Action List starts, and when conversation options appear on screen. That being the case, I don't see a way of using it to help ascertain if the action list has truly finished.

  • My mistake - this is only set if the options are not overridden by the action.

    What you instead want to read is IsConversationOverride() - which is a property of ActiveList, which is used to record data about an ActionList currently being run.

    Something like this:

    foreach (ActiveList activeList in KickStarter.actionListManager.activeLists)
    {
        if (activeList.IsConversationOverride ())
        {
            // This ActionList is busy:
            // activeList.actionList
        }
    }
    

    You can also read IsNecessary(), which makes further checks for things like it being paused etc.

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.