Downloaded the integration and set up as instructed.
Title menu -> New Game button -> Actionlist used Object: Sends message to AC_FlowRunner's Interact method.
I could not use the Object: Call event, it won't allow me to add AC_FlowRunner to the object field.
I also noticed the Object: Sends message adds a floppy disk icon next to the AC_FlowRunner prefab.
This is the line that gives the error
_name = (speaker as IObjectWithDisplayName).DisplayName;
NullReferenceException: Object reference not set to an instance of an object
AC.Downloads.ArticyDraft.ArticyFlowPlayer.GetCharacterWithName (Articy.Unity.ArticyObject speaker) (at Assets/AdventureCreator/Downloads/ArticyDraft integration/Scripts/ArticyFlowPlayer.cs:344)
AC.Downloads.ArticyDraft.ArticyFlowPlayer.OnFlowPlayerPaused (Articy.Unity.IFlowObject aObject) (at Assets/AdventureCreator/Downloads/ArticyDraft integration/Scripts/ArticyFlowPlayer.cs:116)
Articy.Unity.ArticyFlowPlayer.OnFlowPlayerPaused (Articy.Unity.IFlowObject aObject) (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
Articy.Unity.ExecutionEngine.EnsureValidStop () (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
Articy.Unity.ExecutionEngine.Next (Articy.Unity.Branch aBranch) (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
Articy.Unity.ExecutionEngine.EnsureValidStop () (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
Articy.Unity.ExecutionEngine.set_StartNode (Articy.Unity.ArticyObject value) (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
Articy.Unity.ArticyFlowPlayer.set_StartOn (Articy.Unity.Interfaces.IArticyObject value) (at <3a5b9983721c45b5b36cea0a37baf9c3>:0)
AC.Downloads.ArticyDraft.ArticyFlowPlayer.RunFlow (Articy.Unity.Interfaces.IArticyObject articyObject) (at Assets/AdventureCreator/Downloads/ArticyDraft integration/Scripts/ArticyFlowPlayer.cs:87)
AC.Downloads.ArticyDraft.ArticyFlowRunner.Interact () (at Assets/AdventureCreator/Downloads/ArticyDraft integration/Scripts/ArticyFlowRunner.cs:24)
UnityEngine.GameObject:SendMessage(String, SendMessageOptions)
AC.ActionSendMessage:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionSendMessage.cs:112)
AC.d__47:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:471)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:413)
AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:608)
AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:577)
AC.d__47:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:541)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:413)
AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:618)
AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:577)
AC.d__47:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:541)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can't use the Object: Call event Action to reference an in-scene object from an ActionList asset. Object: Send message can be used in this way - the disk icon just indicates the link.
The error suggests there's no associated speaker with the "IObjectWithSpeaker" class. I've updated the integration to cater for this.
Thanks for the fix.
Couple more questions
1. After the send message to Interact, I want to move the character, but the move to to point starts during the conversation, is there a way to wait till the end of the articy convo to end the move the character?
Thanks
I have updated the package once more with a slight tweak that should allow for a custom Action to play flows, with a "Wait until finish?" option.
Once you've imported the updated package, you can use the script below as a custom Action:
The location of the flow / runner components shouldn't matter too much, but you'll need a separate AC_FlowRunner component for each Flow you wish to run.
Thanks for the code.
It's half working.
If a conversation is linear, the custom action ActionArticy will wait till it finishes.
But if a conversation has a branch with options, the dialogue will stop at the branching, the dialog option UI will not show.
I traced it till the following code in ArticyFlowPlayer
if (conversation.options.Count > 1)
{
conversation.Interact ();
KickStarter.stateHandler.EnforceCutsceneMode = false;
}