Dialogue conditions execute too fast

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Esylin
Posts: 45
Joined: Thu Dec 16, 2021 1:21 am

Dialogue conditions execute too fast

Post by Esylin »

Hi, I made a DnD style persuade skill check system run by PlayMaker. It works like this:

1) If the player select "Persuade" from the response menu, a Playmaker game object Scene Event will be executed. The PlayMaker game object will calculate the skill formula and return 2 bool results to Dialogue system variable: SkillCheckResult=true or SkillCheckResult=false.

2) Then I have 2 different dialogue entry based on SkillCheckResult conditions.

But it looks like the dialogue entry conditions execute too fast, so the dialogue entry conditions that the players get does not match the SkillCheckResult variable returned by PlayMaker unless I insert 2 more dialogue entries between them.

This does not work:
Does not work.png
Does not work.png (26.17 KiB) Viewed 597 times
But this works:
Does Work.png
Does Work.png (27.05 KiB) Viewed 597 times
Are there smarter way to do this? I prefer not to instert 2 useless dialogue entries everytime the player uses skill check.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue conditions execute too fast

Post by Tony Li »

Hi,

You should only need to insert one entry, and set its Sequence to None() or Continue(). (Use Continue() if you use continue buttons.) Explanation: Conversations Evaluate Conditions One Extra Level Ahead
Esylin
Posts: 45
Joined: Thu Dec 16, 2021 1:21 am

Re: Dialogue conditions execute too fast

Post by Esylin »

Tony Li wrote: Thu Jun 08, 2023 8:03 am Hi,

You should only need to insert one entry, and set its Sequence to None() or Continue(). (Use Continue() if you use continue buttons.)
Hi, I tried this, it looks like this works with dialogue system Lua scripts but not playmaker game object. :cry:
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue conditions execute too fast

Post by Tony Li »

If the PlayMaker FSM changes states, it may take an extra frame to change state, which would require the extra node.
Esylin
Posts: 45
Joined: Thu Dec 16, 2021 1:21 am

Re: Dialogue conditions execute too fast

Post by Esylin »

Tony Li wrote: Thu Jun 08, 2023 2:07 pm If the PlayMaker FSM changes states, it may take an extra frame to change state, which would require the extra node.

My PlayMaker FSM changed states about 4 times, I tried to use 7 empty nodes with Continue() but it still doesn't work. :cry:

If there are no other way to solve this I can try to make PlayMaker FSM start calculating all the possible outcome at Start node and return the calculation result before player select their choice. I am not sure if this is a good solution though. :?:
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue conditions execute too fast

Post by Tony Li »

Instead of 7 empty nodes, try 1 node with this Sequence:

Code: Select all

Continue()@0.5
This will delay 0.5 seconds, which isn't what we'll want in the end, but it'll tell us if a delay works at all.
Esylin
Posts: 45
Joined: Thu Dec 16, 2021 1:21 am

Re: Dialogue conditions execute too fast

Post by Esylin »

Tony Li wrote: Fri Jun 09, 2023 11:04 am Instead of 7 empty nodes, try 1 node with this Sequence:

Code: Select all

Continue()@0.5
This will delay 0.5 seconds, which isn't what we'll want in the end, but it'll tell us if a delay works at all.
Alright! It looks like 2 empty nodes with Continue()@0.1 works, and it doesn't feel like the conversation delayed too much.

One empty node with Continue()@0.5 or Continue()@1 does not work however.

Thanks for your help!
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue conditions execute too fast

Post by Tony Li »

I'm not sure exactly what's going on there, but I'm glad it's working. If you'd like to get to the bottom of why it's like this, feel free to send a reproduction project to tony (at) pixelcrushers.com.
Post Reply