Hi Tony,
My variables list is getting pretty long. I discovered while adding booleans to conversations that a simple "Met NPC" variable won't work because it sets the boolean to true on every other NPC, even if my player hasn't met them yet! So I started creating variables for each individual NPC, "met Rick", "met Daisy", etc. I can see this turning into a huge mess down the road, I'm wondering if there's a way to make the same boolean work across multiple NPC's without them activating each other?
Making variables exclusive to the conversant
-
- Posts: 34
- Joined: Mon Dec 30, 2019 4:26 pm
Re: Making variables exclusive to the conversant
Hi,
There are two common approaches:
1. Continue using variables, and name them in a way that makes them easy to filter, such as "Rick.met", "Daisy.met", "Daisy.gaveFlowers", "Daisy.insulted", etc. Then you can filter for "Daisy." and see only Daisy's variables. And you can also sort the Variables list alphabetically to group all of Daisy's variables together.
2. Or use actor fields. For example, define an actor field named "Met". Then you can use Actor["Rick"].Met instead of Variable["metRick"] and Actor["Daisy"].Met instead of Variable["metDaisy"]. To add the field to all actors, use the Templates tab.
There are two common approaches:
1. Continue using variables, and name them in a way that makes them easy to filter, such as "Rick.met", "Daisy.met", "Daisy.gaveFlowers", "Daisy.insulted", etc. Then you can filter for "Daisy." and see only Daisy's variables. And you can also sort the Variables list alphabetically to group all of Daisy's variables together.
2. Or use actor fields. For example, define an actor field named "Met". Then you can use Actor["Rick"].Met instead of Variable["metRick"] and Actor["Daisy"].Met instead of Variable["metDaisy"]. To add the field to all actors, use the Templates tab.
-
- Posts: 34
- Joined: Mon Dec 30, 2019 4:26 pm
Re: Making variables exclusive to the conversant
Easy enough, thanks again Tony!
Re: Making variables exclusive to the conversant
Glad to help!