Hi there!
Okay, let me explain you my problem (I couldn't find and answer in the forum):
In the node Launch I want to call a function which will return a result (Success or Failure) in a variable number of seconds (Which I cannot know beforehand). In the connecting nodes I have a LuaRegistered Function which checks the variable in which I store the result of my function from before.
My problem is that I don't know how to make the connecting nodes to wait for the Launch function to finish. I've been trying several things but I cant find the proper way to do it.
If I, for example, use a script with a coroutine inside, the moment I reach any "yield return something" the conditions get called.
I've tried to use a Custom sequence too but the conditions get called even before reaching the Awake Functionof the Custom Sequence.
I'm sure I'm missing something, but I cannot find what it is.
Thanks in advance!
Node1 Sequence before Node2 Condition
Re: Node1 Sequence before Node2 Condition
Hi,
Add a blank node between Launch and Success/Failure. Set its Sequence to Continue(). This is the explanation, with a screenshot of an example:
Conversations Evaluate Conditions One Extra Level Ahead
Add a blank node between Launch and Success/Failure. Set its Sequence to Continue(). This is the explanation, with a screenshot of an example:
Conversations Evaluate Conditions One Extra Level Ahead
Re: Node1 Sequence before Node2 Condition
THANK YOU SO MUCH, I imagined that I was going to do something like this but it is reassuring to see it in the documentationTony Li wrote: ↑Mon May 09, 2022 8:10 am Hi,
Add a blank node between Launch and Success/Failure. Set its Sequence to Continue(). This is the explanation, with a screenshot of an example:
Conversations Evaluate Conditions One Extra Level Ahead
Re: Node1 Sequence before Node2 Condition
Glad to help!
One thing I forgot to mention: Since your function may take a variable amount of time, set Launch's Sequence to something like:
This will make the Launch node wait for your code to send a sequencer message "FinishedFunction". At the end of your function, use this line of C# code:
One thing I forgot to mention: Since your function may take a variable amount of time, set Launch's Sequence to something like:
Code: Select all
WaitForMessage(FinishedFunction)
Code: Select all
PixelCrushers.DialogueSystem.Sequencer.Message("FinishedFunction");