Running sequences on conditions ?
Running sequences on conditions ?
Hi ,
I want to popup a textbox (that will prompt for name) only when name is not given ? something like if statement ??
Currently I am using blank nodes just to check the condition but I feel there can be a better way to implement this
Thanks.
Nishant
I want to popup a textbox (that will prompt for name) only when name is not given ? something like if statement ??
Currently I am using blank nodes just to check the condition but I feel there can be a better way to implement this
Thanks.
Nishant
Re: Running sequences on conditions ?
Yes, all triggers, such as Dialogue System Trigger and Sequence Trigger, have a Condition section. You can set conditions such as certain Lua variable values, certain quest states, etc. Then they will only fire if all of the Conditions are true.
Re: Running sequences on conditions ?
Sorry, I think I misunderstood what you mean. I think you want this to happen during a conversation.
One way to do that is to inspect the node with the TextInput() sequence. Set the False Condition Action to Passthrough. This way, if the node is false it will fall through to the next node. Then set the Conditions to something like:
So if Variable["Name"] is blank, it will use this node and run the TextInput() sequence. Otherwise it will fall through to the next node.
One way to do that is to inspect the node with the TextInput() sequence. Set the False Condition Action to Passthrough. This way, if the node is false it will fall through to the next node. Then set the Conditions to something like:
Code: Select all
Variable["Name"] == ""
Re: Running sequences on conditions ?
Hi ,
Sorry for replying so late ... was on a break . Well am doing exactly what you mentioned. Problem is I dont want a blank dialogue box along with . Isnt it possible to run a method call from sequence only on a condition ? Like how we execute sequence method after few seconds using @seconds , just want a condition instead of time. Also I noticed another issue . If I choose to cancel the conversation when textbox is active, only textbox disappears not the dialogue UI and thus player cant remove it as I freeze the user input when conversation starts.
Sorry for replying so late ... was on a break . Well am doing exactly what you mentioned. Problem is I dont want a blank dialogue box along with . Isnt it possible to run a method call from sequence only on a condition ? Like how we execute sequence method after few seconds using @seconds , just want a condition instead of time. Also I noticed another issue . If I choose to cancel the conversation when textbox is active, only textbox disappears not the dialogue UI and thus player cant remove it as I freeze the user input when conversation starts.
Re: Running sequences on conditions ?
I'll put together an example and post it here later today.nishant wrote:Sorry for replying so late ... was on a break . Well am doing exactly what you mentioned. Problem is I dont want a blank dialogue box along with . Isnt it possible to run a method call from sequence only on a condition ? Like how we execute sequence method after few seconds using @seconds , just want a condition instead of time.
This sounds like a bug. I'll look into it and report back here.nishant wrote:Also I noticed another issue . If I choose to cancel the conversation when textbox is active, only textbox disappears not the dialogue UI and thus player cant remove it as I freeze the user input when conversation starts.
Re: Running sequences on conditions ?
Ok issue with this was Cancel Button in dialogue manager was set to none , while cancel conversation was set to esc . Is this the expected behaviour ? What is the difference between the 2 ?
I read it in docs
Cancel The key and/or button that the player can use to cancel a dialogue entry sequence
Cancel Conversation The key and/or button that the player can use to cancel the active conversation
still not clear though . Can you give an example ?
I read it in docs
Cancel The key and/or button that the player can use to cancel a dialogue entry sequence
Cancel Conversation The key and/or button that the player can use to cancel the active conversation
still not clear though . Can you give an example ?
Re: Running sequences on conditions ?
When the Dialogue System is displaying a dialogue entry's subtitle and playing its sequence, it checks for Cancel. If the player presses Cancel, it stops the sequence and immediately progresses to the next step in the conversation.
When the Dialogue System is displaying the response menu, it checks for Cancel Conversation. If the player presses Cancel Conversation, it stops the conversation.
Some developers wanted the Esc key to cancel the current sequence but not cancel the entire conversation. Since the two are separate above, you can configure it this way.
I still need to check about the text field UI, though. I'll get back to you on it.
When the Dialogue System is displaying the response menu, it checks for Cancel Conversation. If the player presses Cancel Conversation, it stops the conversation.
Some developers wanted the Esc key to cancel the current sequence but not cancel the entire conversation. Since the two are separate above, you can configure it this way.
I still need to check about the text field UI, though. I'll get back to you on it.
Re: Running sequences on conditions ?
Hey ,
So it wasnt a bug actually , I didnt realize the input field has separate buttons to Accept and cancel. Although I had removed cancel button from main dialogue manager , the cancel button on Textbox wasnt changed . So if I pressed esc button it would only cancel the textbox and not the conversation.
So it wasnt a bug actually , I didnt realize the input field has separate buttons to Accept and cancel. Although I had removed cancel button from main dialogue manager , the cancel button on Textbox wasnt changed . So if I pressed esc button it would only cancel the textbox and not the conversation.
Re: Running sequences on conditions ?
Hi,
Here's an example that uses TextInput() only if the player has not entered his or her name yet:
Nishant_2015-10-05.unitypackage
The scene is in Assets/Test/nishant.
The key is this dialogue entry:
Here's an example that uses TextInput() only if the player has not entered his or her name yet:
Nishant_2015-10-05.unitypackage
The scene is in Assets/Test/nishant.
The key is this dialogue entry:
- The Conditions field specifies that this entry is true only if the PlayerName variable is blank.
- False Condition Action has been set to Passthrough. If the Conditions are false (in other words, if the PlayerName is already set), it will fail through to the next entry, which greets the player by name.
Re: Running sequences on conditions ?
Oh cool that should solve it .. Thanks