• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Searching for many items quest

Level 5
Joined
Jan 3, 2022
Messages
25
Hi Everyone!
I've been stuck on one question for a long time... How to make a Quest, the condition of which is to find items, but it doesn't matter in what order they will be found?
In general, something like the search for ingredients for Chen's drink in the first chapter of the Horde Campaign "Founding of Darotar" - it didn't matter in what sequence the items would be found.
Unfortunately, I couldn’t find any information on how to do this using triggers! :(
I would be very grateful if anyone could help! :)
 
Level 24
Joined
Aug 29, 2012
Messages
1,063
There are several ways to handle that, here's one pretty straightforward. You need 1 trigger per item, and 1 trigger to complete the quest

  • Item 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Shimmerweed
    • Actions
      • Set VariableSet ShimmerWeed_Obtained = True
      • Trigger - Run Quest Complete <gen> (checking conditions)
  • Item 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Thunder Lizard Egg
    • Actions
      • Set VariableSet LizardEgg_Obtained = True
      • Trigger - Run Quest Complete <gen> (checking conditions)

  • Item 3
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Thunder Phoenix Egg
    • Actions
      • Set VariableSet PhoenixEgg_Obtained = True
      • Trigger - Run Quest Complete <gen> (checking conditions)

  • Quest Complete
    • Events
    • Conditions
      • LizardEgg_Obtained Equal to True
      • PhoenixEgg_Obtained Equal to True
      • ShimmerWeed_Obtained Equal to True
    • Actions
      • -------- < Your actions here > --------
Everytime you pick up one of the quest items, it will attempt to complete the quest but only if all conditions are met, in this case, all my boolean variables must be set to true before that

You can probably combine all item pick up triggers into a single one with several if/then/elses, that was just for the sake of the example
 
Level 5
Joined
Jan 3, 2022
Messages
25
Now is the time to try your method. I would still like to clarify - at the moment where we indicate a variable, as I understand it, VariableSet ShimmerWeed_Obtained is the name of one variable (and it's type - "Item"). And what type of variable True should be an "Item" too?
 
Top