bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by NotVeryProfessional »

Adding

Code: Select all

Dialog[thisID].SimStatus ~= "WasDisplayed"
as a Condition to a node should make this node show only the first time, correct?

In my case, it makes it show up not at all, even at the first time. Did I make a mistake in the syntax?
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by Tony Li »

That should work. Are there any errors or warnings in the Console?
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by NotVeryProfessional »

Actually yes, here's the error I get:

Dialogue System: Lua code 'return Dialog[thisID].SimStatus ~= "WasDisplayed"' threw exception 'Lookup of field '20' in the table element failed because the table element itself isn't in the table.'
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by Tony Li »

Hi,

What version of the Dialogue System are you using? Are you using cross-conversation links or running more than one conversation at a time? (Both of these are issues that were addressed in previous versions.)

If this happens with every SimStatus check, have you enabled SimStatus in the Dialogue Manager's Other Settings section?
NotVeryProfessional
Posts: 150
Joined: Mon Nov 23, 2020 6:35 am

Re: bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by NotVeryProfessional »

tl;dr: It was SimStatus.


version 2.2.27 but I could upgrade to 2.2.30

I use no cross-conversation links and only one conversation at a time.

It might have been the SimStatus. I had it enabled, but somewhere between prefab and scene something could have turned it off. After checking that it is on everywhere, I don't get errors anymore and it seems to work. Sorry for wasting your time.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: bug with Dialog[thisID].SimStatus ~= "WasDisplayed"

Post by Tony Li »

No worries! I'm glad it's working now.
Post Reply