simstatus condition in script setting

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

simstatus condition in script setting

Post by joeylu »

Hi Tony, In each dialogue entry, I'm using the script area to set variables, something like Variable["relationship"] += 1;
My issue is that I don't want this dialogue entry to += 1 everytime, instead, it should +=1 only once.
My idea is to use simstatus to conditioning the scritp, what is the proper way to set this condition in "script" area? tks
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: simstatus condition in script setting

Post by joeylu »

also, is there any way to display some extra icons to indicate the current dialogue entry node has scripts/conditions or custom fields?
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: simstatus condition in script setting

Post by Tony Li »

joeylu wrote: Tue Apr 05, 2022 5:30 am Hi Tony, In each dialogue entry, I'm using the script area to set variables, something like Variable["relationship"] += 1;
My issue is that I don't want this dialogue entry to += 1 everytime, instead, it should +=1 only once.
My idea is to use simstatus to conditioning the scritp, what is the proper way to set this condition in "script" area? tks
Try something like this:

Code: Select all

if (Dialog[thisID].SimStatus == "Untouched") then Variable["relationship"] = Variable["relationship"] + 1 end
joeylu wrote: Tue Apr 05, 2022 7:28 am also, is there any way to display some extra icons to indicate the current dialogue entry node has scripts/conditions or custom fields?
A node will show a red question mark if it has Conditions, a green arrow if it has a Script, and a blue play icon if it has a Sequence:

nodeIcons.png
nodeIcons.png (10.37 KiB) Viewed 1108 times

If you don't see those, then you've probably moved the Unity special folder named 'Editor Default Resources'. Unity requires that this folder is named exactly 'Editor Default Resources' and that it's in the root Assets folder. Please move it back into its correct position.
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: simstatus condition in script setting

Post by joeylu »

all works well, yes I did move the default editor resource folder :(
one inrelevant question, I'm working on a game that supports multiple language, to be more speicific, it supports both English and Chinese, I have notice that in dialogue editor, for each dialogue entry, if I input unicode (Chinese character), the text will be overflow outside of the node, not like english wording that will be "clipped" if it's too long
Anyway I can have it set from overflow to clipping? tks
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: simstatus condition in script setting

Post by Tony Li »

Currently the nodes clip by character count, and the Chinese characters are wider. In a future update (no time estimate yet), the editor will clip by the node boundaries. There wasn't an efficient way to do that in older versions of Unity.
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: simstatus condition in script setting

Post by joeylu »

Hi Tony
I added Dialog[thisID].SimStatus =="Untouched" in the condition field, but I'm getting following error, any idea?

Dialog[thisID].SimStatus =="Untouched" threw exception 'Lookup of field '4' in the table element failed because the table element itself isn't in the table.'
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: simstatus condition in script setting

Post by Tony Li »

Hi,

Can you please back up your project, make sure you have a good backup, and then update to the latest Dialogue System version and let me know if the issue still occurs?
Post Reply