Pick up weapons quest

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Brijac
Posts: 18
Joined: Sat Apr 25, 2020 5:40 pm

Pick up weapons quest

Post 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?
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Pick up weapons quest

Post 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.
Post Reply