Configurable conditions-checking in component inspector?
Posted: Thu Jan 14, 2021 10:18 pm
Hi Tony and everyone
Sorry if this has been asked before, but I looked through the forum for a while and figured I'd just go ahead and ask.
I'm looking for a 'generic' way to check if specific conditions (dialogue variables) are met, to then trigger something happening. Ideally something like adding a List of *DialogueVariableConditions* to a script, and then being able to configure that list of conditions in the inspector.
One example of usage for this is that I have an NPC that will appear at different places depending on conditions. If you haven't completed the tutorial he appears at the Training Grounds. If you beat the tutorial but not the big boss, he appears at the camp. If you beat the tutorial and the big boss, he appears at the castle (silly example but you get what I mean).
The NPC would be placed at all 3 of those locations, and only the one that meets the conditions would have their gameobject activated when the area is loaded (the others would be disabled).
Are there any built-in ways to configure a list of variable conditions in the inspector for a script? Or would I need to implement it myself?
Thanks a lot!
Sorry if this has been asked before, but I looked through the forum for a while and figured I'd just go ahead and ask.
I'm looking for a 'generic' way to check if specific conditions (dialogue variables) are met, to then trigger something happening. Ideally something like adding a List of *DialogueVariableConditions* to a script, and then being able to configure that list of conditions in the inspector.
One example of usage for this is that I have an NPC that will appear at different places depending on conditions. If you haven't completed the tutorial he appears at the Training Grounds. If you beat the tutorial but not the big boss, he appears at the camp. If you beat the tutorial and the big boss, he appears at the castle (silly example but you get what I mean).
The NPC would be placed at all 3 of those locations, and only the one that meets the conditions would have their gameobject activated when the area is loaded (the others would be disabled).
Are there any built-in ways to configure a list of variable conditions in the inspector for a script? Or would I need to implement it myself?
Thanks a lot!