• 🏆 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!

Quest Help!

Status
Not open for further replies.
Level 3
Joined
Nov 28, 2009
Messages
47
I have recently been struggeling with the following problem relating to multi-user quests:

In my quest a player is required to kill 10 creeps but the problem is that only the "killing unit"(unit that gets the last shot which kills the creep) gets his quest updated to 1/10 creeps killed but the rest of the players who also have the quest and are all contrebuting to killing the unit dont get their quest updated. Is there a way that i can also update the quest for other units who are in a certain range of the killing unit and have the quest?

Thankyou
 
Level 3
Joined
Nov 28, 2009
Messages
47
that isnt my problem the trigger does affect every player by using "killing unit" trigger. What i do need help with though is adding a condition/trigger that if a unit has the quest and is within 100 units of the killing unit that unit will also get his quest updated and not just the killing unit.
 
Level 2
Joined
Jan 24, 2010
Messages
16
Try a "Pick every Player" Action.

Then simply add an "If / Then / Else" Action and set the condition to "Is ally of (Owner of Killing Unit)" (or something like that.
As "Then" actions, add the quest update actions you made for the owner of the killing unit and replace the owner with the picked players.
 
Level 5
Joined
Apr 8, 2008
Messages
88
You could probably do like this :wink:

  • Questtrigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to [YourChoise]
      • (Owner of (Triggering unit)) Equal to Player [YourChoise]
    • Actions
      • Set DeadUnit = (Position of (Triggering unit))
      • Set QuestGroup = (Units within 700.00 of DeadUnit matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in QuestGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HaveQuest[(Player number of (Owner of (Picked unit)))] Equal to True
            • Then - Actions
              • Set Kills[(Player number of (Owner of (Picked unit)))] = (Kills[(Player number of (Owner of (Picked unit)))] + 1)
            • Else - Actions
      • Custom script: call DestroyGroup( udg_QuestGroup )
      • Custom script: call RemoveLocation( udg_DeadUnit )
You will need to add the "Set HaveQuest" = true when a player get the quest.

*Im not sure if this will work properly if a player got more then 1 hero*
 
Status
Not open for further replies.
Top