• 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.

Quest

Status
Not open for further replies.
Level 3
Joined
Apr 23, 2009
Messages
58
can you people help me this
i need a trigger that counts a specific unit like "dragon"
So when you killed 1 "dragon"
it says 1/6 dragon(s) ect

So how can i count the "dragon(s)" being killed from a specific hero ?

(please don't let me make new variables or custom scripts)

Thanks already

~13lade~
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

You can simply create a variable and use trigger:

  • Dragon Die
    • Events:
      • Unit - Unit dies
    • Conditions:
      • Unit Type of dying Unit egual to Your dragon
    • Actions:
      • Set Variable = Variable +1
      • If (If conditions) then (then Actions) else (else actions)
        • If - Conditions
          • Variable equal to 6
        • Then - Actions:
          • Quest - Mark Complete and so on
          • Trigger - Turn off this trigger
I thinks its the best way to do it^^ (with variable)
 
Level 11
Joined
Feb 14, 2009
Messages
884
Dr. Boom's trigger fires when a unit is killed. The conditions ensure that the unit that died is your dragon. If it is, it procceeds to the actions. If not, nothing happens.

  • Set Variable = Variable +1
This increases the kill count.

  • If (If conditions) then (then Actions) else (else actions)
    • If - Conditions
      • Variable equal to 6
    • Then - Actions:
      • Quest - Mark Complete and so on
      • Trigger - Turn off this trigger
This checks if the desired amount of dragon kills has been reached. If the player has killed all 6 dragons, then it marks your quest as completed and disables this trigger, so that the quest is not repeatable. If you want it to be repeateble, remove the last two lines and replace them with a message informing the player that the quest has been completed.
 
Last edited:
Level 3
Joined
Apr 23, 2009
Messages
58
uhm sorry to tell you but i don't come farder than
  • quest lunar warrior 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Haodron BloodElf
    • Actions
      • Set bloodelfquest = bloodelfquest
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Quest - Mark (Last created quest) as Completed
        • Else - Actions
because i can't find Variables & Numbers in the same thing
______________________

Bloodelfquest is mine variable
and Haodron BloodElf is mine unit
 
Level 2
Joined
Jun 4, 2007
Messages
8
Bloodelfquest must be a variable of type integer. Then, at "Set Variable" you just use the point "Arithmetic", where you can do math stuff with two or more parts. The one part is bloodelfquest, the other is 1, of course.
The condition must be a simple integer comparison (bloodelfquest = 6). Thats it.

At the else-section of the if/then/else you can display the text you want to show. Just use Show Text for Players and show "bloodelfquest/6 dragons killed" (by using Concatenate Strings and Integer to String)
 
Level 11
Joined
Feb 14, 2009
Messages
884
  • Set bloodelfquest = bloodelfquest
This trigger does nothing. What's its type?
Here's what you can do:

Create a quest type variable.
  • Events
    • Unit - A unit Dies
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to Haodron BloodElf
  • Actions
    • Set Kills = Kills + 1
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Kills = 6
      • Then - Actions
        • Quest - Mark MyQuest as Completed
        • ----Set the rewards here----
The trigger that actually creates the quest
  • Events
    • Map initialization (or anything else you want)
  • Conditions
  • Actions
    • Quest - Create a Required quest titled My Title with the description My description, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
    • Set MyQuest = (Last created quest)
 
Level 3
Joined
Apr 23, 2009
Messages
58
ouch sorry shuhu i must have mist that, but integer works great
But i got this to start the quest
  • quest lunar warrior
    • Events
      • Unit - A unit comes within 150.00 of Lunar Warrior 0317 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Warrior
    • Actions
      • Quest - Create a Required quest titled Path to Lunar Warri... with the description You have to slay 11..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
but i can't find the --- Set MY Quest = Last Created Quest ---

But this is already done so whats above i just need
  • quest lunar warrior 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Haodron BloodElf
    • Actions
      • Set bloodelfquest = ((bloodelfquest + 1) + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bloodelfquest Equal to 6
        • Then - Actions
          • Quest - Mark (Last created quest) as Completed
          • Camera - Pan camera as necessary for (Owner of (Triggering unit)) to (Center of Region 000 <gen>) over 0.50 seconds
          • Unit - Create 1 Lunar Warrior for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
        • Else - Actions
 
Level 2
Joined
Jun 4, 2007
Messages
8
This is wrong:
Set bloodelfquest = ((bloodelfquest + 1) + 1)
You set it +2 on this way.

The MyQuest-Thing needs a variable of type "quest" which must be set to "Last Created Quest".
 
Level 3
Joined
Apr 23, 2009
Messages
58
Schubu i have already removed the ) + 1) so thats not a problem anymore

But i don't see the conection between these 2 triggers i made for the quest
  • quest lunar warrior
    • Events
      • Unit - A unit comes within 150.00 of Lunar Warrior 0317 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Warrior
    • Actions
      • Quest - Create a Required quest titled Path to Lunar Warri... with the description You have to slay 11..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set bloodquest = (Last created quest)
      • Trigger - Turn off (This trigger)
      • Wait 60.00 seconds
      • Trigger - Turn on (This trigger)
and
  • quest lunar warrior 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Haodron BloodElf
    • Actions
      • Set bloodelfquest = (bloodelfquest + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bloodelfquest Equal to 11
        • Then - Actions
          • Quest - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the Quest Update message: Quest Completed ple...
          • Quest - Mark (Last created quest) as Completed
          • Camera - Pan camera as necessary for (Owner of (Triggering unit)) to (Center of Region 000 <gen>) over 0.50 seconds
          • Unit - Create 1 Lunar Warrior for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
          • Trigger - Turn off (This trigger)
          • Wait 60.00 seconds
          • Trigger - Turn on (This trigger)
        • Else - Actions
and it doesn't work, because when it gets in 150 range of "Lunar Warrior" it doesn't shows up like an quest
can you help me with that

~13lade~
 
Level 1
Joined
May 4, 2009
Messages
6
I just made a trigger like the first one and it works. It simply adds the quest to que quest list, though, so you may want to use a "Quest - Quest message" action to display the new quest as a message and make the Quests [F9] button shine :p.

More things:

in your second trigger, in the Actions, replace "Last created quest" with the quest variable you created before, "bloodquest":
  • Quest - Mark (bloodquest) as Completed
And, if you use (Owner of (Triggering unit)), it will affect the Owner of the unit dying. You should use (Owner of (Killing Unit)):
  • Camera - Pan camera as necessary for (Owner of (Killing unit)) to (Center of Region 000 <gen>) over 0.50 seconds
  • Unit - Create 1 Lunar Warrior for (Owner of (Killing unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
One last thing... Why do you turn off the triggers and turn them on again after 1 minute?
 
Last edited:
Level 3
Joined
Apr 23, 2009
Messages
58
  • quest lunar warrior
    • Events
      • Unit - A unit comes within 150.00 of Lunar Warrior 0317 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Warrior
    • Actions
      • Quest - Create a Required quest titled Path to Lunar Warri... with the description You have to slay 11..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set bloodquest = (Last created quest)
      • Trigger - Turn off (This trigger)
      • Wait 60.00 seconds
      • Trigger - Turn on (This trigger)
  • quest lunar warrior 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Haodron BloodElf
    • Actions
      • Set bloodelfquest = (bloodelfquest + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bloodelfquest Equal to 11
        • Then - Actions
          • Quest - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) the Quest Update message: Quest Completed ple...
          • Quest - Mark bloodquest as Completed
          • Camera - Pan camera as necessary for (Owner of (Triggering unit)) to (Center of Region 000 <gen>) over 0.50 seconds
          • Unit - Create 1 Lunar Warrior for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
          • Trigger - Turn off (This trigger)
          • Wait 60.00 seconds
          • Trigger - Turn on (This trigger)
        • Else - Actions
is there also a way that you have to go back to the Quest Giver ??
 
Status
Not open for further replies.
Top