• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Quest problem...

Status
Not open for further replies.
Level 20
Joined
Apr 14, 2012
Messages
2,901
I'm having a little difficulty when it comes to quests that needs items to be acquired in order for it to be complete. For example, a quest states that the player gets those two items, and when the player picks up one of those items, a text would say "you have picked up + (string(item_counter) + /2", but in my trigger when the player picks up one item no text shows, nor is the quest description showing that the player has picked up an item change.

  • Villager Jack Give Quest
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Selling unit) Equal to NPC[4]
    • Actions
      • Set Quest_scroll = (Sold Item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_Count Less than or equal to 2
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • VillagerJack_Boolean Equal to True
            • Then - Actions
              • Item - Remove Quest_scroll
              • Game - Display to (All players) the text: You cannot take the...
            • Else - Actions
              • Set VillagerJack_Boolean = True
              • Special Effect - Destroy NPC_SFX[4]
              • Item - Remove Quest_scroll
              • Quest - Create a Optional quest titled Lumber is Needed with the description [GRADE D] Collect ..., using icon path ReplaceableTextures\CommandButtons\BTNHumanLumberMill.blp
              • Set Quest[5] = (Last created quest)
              • Quest - Mark Quest[5] as Discovered
              • Quest - Create a quest requirement for Quest[5] with the description Collected Lumber: 0...
              • Set Quest_Requirement[5] = (Last created quest requirement)
              • Quest - Mark Quest_Requirement[5] as Incomplete
              • Wait 0.30 seconds
              • Quest - Display to (All players) the Quest Discovered message: Quest Discovered: C...
              • Quest - Flash the quest dialog button
              • Wait 4.00 seconds
              • Cinematic - Clear the screen of text messages for (All players)
              • Set Quest_Count = (Quest_Count + 1)
              • Set Temp_Point = (Center of Lumber 1 <gen>)
              • Item - Create Construction Lumber at Temp_Point
              • Set Wood[1] = (Last created item)
              • Custom script: call RemoveLocation(udg_Temp_Point)
              • Set Temp_Point = (Center of Lumber 2 <gen>)
              • Item - Create Construction Lumber at Temp_Point
              • Set Wood[2] = (Last created item)
              • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
          • Item - Remove Quest_scroll
          • Game - Display to (All players) the text: You can only take t...
  • Lumber Aquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Item being manipulated) Equal to Wood[1]) or ((Item being manipulated) Equal to Wood[2])
    • Actions
      • Set Wood_Counter = (Wood_Counter + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Wood_Counter Equal to 2
        • Then - Actions
          • Quest - Change the description of Quest_Requirement[5] to (Collected Lumber: + ((String(Wood_Counter)) + /2))
          • Quest - Mark Quest_Requirement[5] as Completed
          • Quest - Display to (All players) the Quest Update message: Quest Update: Requi...
        • Else - Actions
          • Quest - Change the description of Quest_Requirement[5] to (Collected Lumber: + ((String(Wood_Counter)) + /2))
          • Game - Display to (All players) the text: (You have collected + ((String(Wood_Counter)) + Piece(s) of Lumber))
Help...
 
Last edited:
Level 20
Joined
Apr 14, 2012
Messages
2,901
Have you set up the Wood array properly, could you post that trigger?

Okay. I have posted it :)

I analyzed my triggers... I thought at first it was this one:

  • Stack
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
      • (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
    • Actions
      • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Item - Remove (Item being manipulated)

But then I turned it off, but nothing changed.
 
Last edited:
Status
Not open for further replies.
Top