Page 1 of 1

Making variables exclusive to the conversant

Posted: Fri Jan 17, 2020 8:56 am
by chrislow19
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?

Re: Making variables exclusive to the conversant

Posted: Fri Jan 17, 2020 10:32 am
by Tony Li
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.

Re: Making variables exclusive to the conversant

Posted: Fri Jan 17, 2020 4:13 pm
by chrislow19
Easy enough, thanks again Tony!

Re: Making variables exclusive to the conversant

Posted: Fri Jan 17, 2020 4:36 pm
by Tony Li
Glad to help!