• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Item Recovery Quests ( with Stacking )

Status
Not open for further replies.
Level 9
Joined
Mar 25, 2010
Messages
183
So i am trying to make an item recovery quest where the player needs to find 4 items in order to complete the quest. I have an item stacking system and so am not sure how to do this trigger, normal item recovery with only 1 item works fine however.

Here's what i got so far.

  • Cold Nights
    • Events
      • Unit - Ballista Engineer 0160 <gen> Is selected
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Cold Nights Count <gen>
      • Game - Display to (All players) the text: |c0000FF40Ballista ...
      • Special Effect - Destroy Quest_GiverSFX[6]
      • Quest - Create a Required quest titled Cold Nights with the description I met a ballista en..., using icon path ReplaceableTextures\CommandButtons\BTNPeasant.blp
      • Set Cold_Nights = (Last created quest)
      • Quest - Create a quest requirement for Cold_Nights with the description Find 4 Brown bear p...
      • Set Find_BearPelts = (Last created quest requirement)
      • Quest - Display to (All players) the Quest Discovered message: |c008080C0New Quest...
  • Cold Nights Count
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Brown Bear Pelt
    • Actions
      • Set BearPeltCount = (BearPeltCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BearPeltCount Greater than or equal to 4
        • Then - Actions
          • Quest - Mark Find_BearPelts as Completed
          • Quest - Display to (All players) the Quest Update message: Objective Completed...
          • Quest - Create a quest requirement for Cold_Nights with the description Return to the engin...
          • Set Return_To_Engineer = (Last created quest requirement)
          • Trigger - Turn on Cold Nights Complete <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • Cold Nights Complete
    • Events
      • Unit - Ballista Engineer 0160 <gen> Is selected
    • Conditions
      • (Charges remaining in (Item carried by Player1 of type Brown Bear Pelt)) Greater than or equal to 4
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Display to (All players) the text: |c0000FF40Ballista ...
      • Quest - Mark Return_To_Engineer as Completed
      • Quest - Mark Cold_Nights as Completed
      • Quest - Display to (All players) the Quest Completed message: Quest Completed
      • Hero - Add 500 experience to Player1, Show level-up graphics
 
Hey there,
in your second trigger when he requires all 4 try adding a boolean.
  • Set ExampleBoolean = true
Then check if in the final trigger, but also instead of charges remaining do it this way, its more ifs. But it will help
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ExampleBoolean equal to (==) true
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by Player1 of type Brown Bear Pelt)) Greater than or equal to 4
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to (All players) the text: |c0000FF40Ballista ...
          • Quest - Mark Return_To_Engineer as Completed
          • Quest - Mark Cold_Nights as Completed
          • Quest - Display to (All players) the Quest Completed message: Quest Completed
          • Hero - Add 500 experience to Player1, Show level-up graphics
          • Else - Actions
    • Else - Actions
 
Level 9
Joined
Mar 25, 2010
Messages
183
Hmm, is there some kind of law that i can only use that Boolean trick just once?
I made another item recovery quest, the trigger is identical excpet ofcourse different variables, different items needed and such.
But it just doesn't work :S
 
Hmm, is there some kind of law that i can only use that Boolean trick just once?
I made another item recovery quest, the trigger is identical excpet ofcourse different variables, different items needed and such.
But it just doesn't work :S

Well if you want you can index the boolean,
But is your quest do-able by one person, or all people at once,
If it is all people at once. Then you can just one variable and index it like so
  • Set ExampleBoolean[1] = True
or if your doing for each player
  • Set QuestnameBoolean[(Player number of ([Triggering Player))] = true
Well if your doing per player, Would be a good idea to set a TempVariable to playernumber.
  • Set TempNumber = (Player number of (Triggering Player))
  • Set QuestnameBoolean[TempNumber] = true
 
It's Single Player game so it doesn't really matter ^^

Ohh okay
What you can do is set Prefixs to certain quests
1 = A quest
2 = another
so it would be
  • Set ExampleBoolean[1] = True
  • set ExampleBoolean[2] = False
So each quest has a different number, so now we put it in a trigger
  • Conditions
    • ExampleBoolean[2] = True
  • Actions
    • Game - Display Message to (Player) bla bla bla.
    • ------ Obviosuly you would change the two to what ever number you want, but make sure to make it true once the quest requirements are met. -----
 
Level 9
Joined
Mar 25, 2010
Messages
183
Sorry for Necroposting but i don't wanna make a thread bout the same thing.
Anyway the triggers worked for a while and now they just stopped working O.O
I have no idea what i did or whats causing this, i used an array like you said.
A different array nr. for each quest.
Here's but one of many item recovery quests that stopped working.

  • Delicous Rockberries Count
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Delicous Rockberry
    • Actions
      • Set Rockberry_Count = (Rockberry_Count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rockberry_Count Greater than or equal to 6
        • Then - Actions
          • Set B_ItemRecovery[1] = True
          • Quest - Mark Gather_Rockberry as Completed
          • Quest - Display to (All players) the Quest Update message: Objective Completed...
          • Quest - Create a quest requirement for Q_Delicous_Rockberries with the description Return the berries ...
          • Set Return_Alchemist = (Last created quest requirement)
          • Trigger - Turn on Delicous Rockberries Complete <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
Anyway that's the Counting trigger, only showing this hence i figured it's the most important one.
 
Status
Not open for further replies.
Top