• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A killing quest

Status
Not open for further replies.
Level 3
Joined
Jun 12, 2011
Messages
21
Hi,I've been wondering on how to make a simple killing quest.(Kill 10 mobs etc.)

Been experimenting,and it never works :/

If anyone can show me,I'd be grateful,thanks!
 
Level 13
Joined
Oct 25, 2009
Messages
995
You can add a Unit type to the Conditions.
  • Quest
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Killed_Unit = (Killed_Unit + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Killed_Unit Equal to 10
        • Then - Actions
          • Quest - Mark (Last created quest) as Completed
        • Else - Actions
 
Level 3
Joined
Jun 12, 2011
Messages
21
Hm,Okay thanks,but is there any way to trigger the quest to update on each kill?

Like example when you kill 1 out of 10 spiders,a text will appear:

1 out of 10 spiders killed.
 
Level 8
Joined
Mar 22, 2008
Messages
422
Part 1
  • Little Bit Hungry Part 1
    • Events
      • Unit - A unit comes within 100.00 of Bob the Farmer 0015 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Special Effect - Destroy QuestEffect[1]
      • Special Effect - Create a special effect attached to the overhead of Bob the Farmer 0015 <gen> using Objects\RandomObject\RandomObject.mdl
      • Set QuestEffect[1] = (Last created special effect)
      • Quest - Display to (All players) the Quest Discovered message: Quest Accepted: Lit...
      • Quest - Create a Optional quest titled Little Bit Hungry with the description Quest Accepted: Lit..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Quests[1] = (Last created quest)
      • Quest - Create a quest requirement for Quests[1] with the description ((String(Kills[1])) + /6 Chicken Meat Collected)
      • Set Quest_Requirment[1] = (Last created quest requirement)
      • Set Kills[1] = 0
      • Trigger - Turn off Little Bit Hungry Part 1 <gen>
      • Trigger - Turn on Little Bit Hungry Part 2 <gen>
Part 2
  • Little Bit Hungry Part 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Chicken
    • Actions
      • Set Kills[1] = (Kills[1] + 1)
      • Quest - Display to (All players) the Quest Update message: ((String(Kills[1])) + /6 Chicken Meat Collected)
      • Quest - Change the description of Quest_Requirment[1] to ((String(Kills[1])) + /6 Chicken Meat Collected.)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[1] Equal to 6
        • Then - Actions
          • Quest - Mark Quest_Requirment[1] as Completed
          • Quest - Display to (All players) the Quest Update message: Quest Compleat: Lit...
          • Trigger - Turn off Little Bit Hungry Part 2 <gen>
          • Trigger - Turn on Little Bit Hungry Part 3 <gen>
        • Else - Actions
Part 3
  • Little Bit Hungry Part 3
    • Events
      • Unit - A unit comes within 100.00 of Bob the Farmer 0015 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Special Effect - Destroy QuestEffect[1]
      • Quest - Display to (All players) the Quest Completed message: Quest Compleat: Lit...
      • Quest - Mark Quests[1] as Completed
      • Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Player - Add 20 to (Owner of (Picked unit)) Current gold
              • Hero - Add 150 experience to (Picked unit), Show level-up graphics
            • Else - Actions
      • Trigger - Turn off Little Bit Hungry Part 3 <gen>


If you want i will send you a demo map with my trigger.
 
Level 3
Joined
Jun 12, 2011
Messages
21
oh,please do pass me a demo of your trigger,some parts in the trigger is confusing me :eekani:
 
Status
Not open for further replies.
Top