Hi,
If you're checking Invector items, you don't have to define a separate variable.
Roughly following the
Quest Tutorial in structure, in step 7 change quest entry 1 from:
to:
Entry 1 will show the value of vGetItemCount(2) instead of the value of a "BabiesSaved" variable.
In the conversation, in place of:
- Conditions: Variable["BabiesSaved"] < 2
use:
- Conditions: vGetItemCount(2) < 2
And similarly for the other node's Conditions (Variable["BabiesSaved"] >= 2).
The only other major difference is that the tutorial uses an Increment On Destroy component, which automatically tells the quest HUD to update. This is what makes Entry 1 show the updated value of the "BabiesSaved" variable.
If the pickup deactivates its GameObject when picked up, you can still use IncrementOnDestroy; just leave the variable part blank.
If it doesn't deactivate its GameObject, you'll need to configure your item pickups to run a DialogueSystemTrigger when picked up. Select Add Action > Run Lua Code, and set the Lua Code field to: UpdateTracker()