In my game, which uses Dialogue System and Adventure Creator, I want to have different things happen in one level depending on the results of a previous decisions in a past scene. Because of the nature of the variables and for easier debugging, I determined it might be better to have it be tracked as an Adventure Creator Pop-Up Global Variable rather than a Dialogue System Variable, however, I need to track the player's decision in the dialogue system.
I'm looking for a way to tell the Dialogue System to set the Adventure Creator Pop-Up Variable to a certain setting when the player makes a decision in one conversation and then, in another conversion, set the Condition Syntax to check which form the AC Pop-Up Variable has taken to determine how to start the conversation in one of 2 ways. I could split this into separate conversations, but I wanted to challenge myself to put them in a single convo for efficiency.
How might I do this?
Creating Conditions for Adventure Creator Variables
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: Creating Conditions for Adventure Creator Variables
Hi,
Internally, pop-up variable values are integers. For example:
If the variable's value were Bananas, then its integer value would be 1.
You can check and set this value using the Dialogue System's AC Lua Functions. Use acGetInteger("Fruit") to get the current value and acSetInteger("Fruit", 2) to set it to Oranges.
Internally, pop-up variable values are integers. For example:
If the variable's value were Bananas, then its integer value would be 1.
You can check and set this value using the Dialogue System's AC Lua Functions. Use acGetInteger("Fruit") to get the current value and acSetInteger("Fruit", 2) to set it to Oranges.
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: Creating Conditions for Adventure Creator Variables
Reactivating this thread because now I have a similar problem but on the opposite end this time and this is somewhat related.
In this instance, I have a minor variance in a conversation based on a Variable I created in Dialogue System's database. It's It's a Number Variable in my dialogue database that, depending on the circumstances, gets set to 0, 1, or 2 depending on the player's actions. That influences the route one of the conversation goes through (Since all of its outcomes are in a single conversation tree. However, now I instead need to have Adventure Creator sense what number that DS variable is and do something else accordingly. This is somewhat minor, so it's not worth making a AC Global Variable for it.
I need it to have 3 nodes checking if the value is 0, 1, or 2 and then do something if that condition is met. I did try using Lua Code in the Action List using AC's third party Action List node Dialogue System Check but it didn't work as a condition and the interaction didn't happen. How should I do this?
In this instance, I have a minor variance in a conversation based on a Variable I created in Dialogue System's database. It's It's a Number Variable in my dialogue database that, depending on the circumstances, gets set to 0, 1, or 2 depending on the player's actions. That influences the route one of the conversation goes through (Since all of its outcomes are in a single conversation tree. However, now I instead need to have Adventure Creator sense what number that DS variable is and do something else accordingly. This is somewhat minor, so it's not worth making a AC Global Variable for it.
I need it to have 3 nodes checking if the value is 0, 1, or 2 and then do something if that condition is met. I did try using
Code: Select all
Variable["VariableName"] == 0
Re: Creating Conditions for Adventure Creator Variables
Hi,
What isn't working about Dialogue System Check?
What isn't working about Dialogue System Check?
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: Creating Conditions for Adventure Creator Variables
It just isn't triggering the check properly so nothing happens when I click the object because it can't run the check. What should I do?
Re: Creating Conditions for Adventure Creator Variables
Use double equals signs:
A single equals sign assigns a value to the variable. Your current Lua code assigns the value 0 to Variable["L5.HospHeadline"]. Instead you want to use "==" so it checks if Variable["L5.HospHeadline"] is equal to zero.
Code: Select all
Variable["L5.HospHeadline"] == 0
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: Creating Conditions for Adventure Creator Variables
THERE we go. Thanks, Tony! You're a lifesaver, as always!
Re: Creating Conditions for Adventure Creator Variables
Happy to help!