Page 1 of 1

Pick up weapons quest

Posted: Thu Jun 04, 2020 3:30 pm
by Brijac
Hello, I'm trying to make a pick up weapons quest where the Player would pick up Sword and Shield (using Invector) that would then attach to his hand. When I make usual quests the items that the Player picks up get disabled so it's easy to make increment on disable and count how many items did the Player pick up and then make the quest "success" but with one where the item does not get disabled (it stays active, it just attaches to the Player hand) I'm not really sure how to make the quest to count when Sword and Shield get picked up and then become "success" after both are picked up?

Re: Pick up weapons quest

Posted: Thu Jun 04, 2020 4:10 pm
by Tony Li
Hi,

Create a Dialogue System Trigger set to OnUse.
  • Set the trigger's Conditions to check the vGetItemCount() Lua function. For example, something like:

    Code: Select all

    vGetItemCount(3) >= 1
    where 3 is the item ID of the sword.
  • Select Add Action > Set Quest State, and set the quest to success.
Invector's vItemManager component has an OnAddItem() event. Connect it to the Dialogue System Trigger, and configure it to call DialogueSystemTrigger.OnUse.