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

Need help with a quest trigger.

Status
Not open for further replies.
Level 3
Joined
Dec 27, 2012
Messages
36
So I sayd in the title the problem is when you kill a unit it shows only that you killed him but not the unit count...I've been checking the triggers tutorials and the quest tutorials but nothing is about the kill count display so i got stuck...again:sad:

Heres the map so you can have a look and change if you want
 

Attachments

  • Rise of the Heros.w3x
    715.9 KB · Views: 47
Level 12
Joined
Sep 11, 2011
Messages
1,176
this
  • Set Kill_Count[(Player number of (Owner of (Triggering unit)))] = (Kill_Count[(Player number of (Owner of (Triggering unit)))] + 1)
should be
  • Set Kill_Count[(Player number of (Owner of (Killing unit)))] = (Kill_Count[(Player number of (Owner of (Killing unit)))] + 1)
this
  • Kill_Count[(Player number of (Owner of (Triggering unit)))] Less than 20
should also be
  • Kill_Count[(Player number of (Owner of (Killing unit)))] Less than 20
show it like this

  • Game - Display to (Player group((Owner of (Killing unit)))) for 3.00 seconds the text: (You've killed + ((String(Kill_Count[(Player number of (Owner of (Killing unit)))])) + Bandits...))
 
Level 3
Joined
Dec 27, 2012
Messages
36
Ok so i did what you sayd and it works fine now. The only problem remaining is that I don't receive the rewards when im killing the last unit. What should I change or what should I add?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Ok so i did what you sayd and it works fine now. The only problem remaining is that I don't receive the rewards when im killing the last unit. What should I change or what should I add?

i forgot this
  • OurQuest[(Player number of (Owner of (Triggering unit)))] Equal to started
should be this
  • OurQuest[(Player number of (Owner of (Killing unit)))] Equal to started
and i don't find this two actions to be of any use, you can remove them..
  • Do nothing
  • Skip remaining actions
 
Level 3
Joined
Dec 27, 2012
Messages
36
  • Quest Bandit Kill Count
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Bandit
      • ((Killing unit) is A Hero) Equal to True
      • Kill_Count[(Player number of (Owner of (Killing unit)))] Less than 20
    • Actions
      • Set Kill_Count[(Player number of (Owner of (Killing unit)))] = (Kill_Count[(Player number of (Owner of (Killing unit)))] + 1)
      • Set playerGroup = (Player group((Owner of (Killing unit))))
      • Game - Display to (Player group((Owner of (Killing unit)))) for 3.00 seconds the text: (You've Killed + (String(Kill_Count[(Player number of (Owner of (Killing unit)))])))
      • Custom script: call DestroyForce(udg_playerGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kill_Count[(Player number of (Owner of (Killing unit)))] Equal to 20
          • OurQuest[(Player number of (Owner of (Killing unit)))] Equal to started
        • Then - Actions
          • Quest - Mark (Last created quest) as Completed
          • Game - Display to (Player group((Owner of (Killing unit)))) for 10.00 seconds the text: You've completed th...
          • Hero - Add 3500 experience to (Killing unit), Show level-up graphics
          • Player - Add 9000 to (Owner of (Killing unit)) Current gold
        • Else - Actions

Okay heres the trigger. Could you please look and check any problems with it
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
I'm not sure why your trigger doen't work.

Take a look at the map I attached, it has a working similar system, and shows how to take advantage of variables and correctly use the player group.


  • Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Footman
      • kills[(Player number of (Owner of (Killing unit)))] Less than 6
    • Actions
      • Set u = (Killing unit)
      • Set i = (Player number of (Owner of u))
      • Set pgroup = (Player group((Owner of u)))
      • Set kills[i] = (kills[i] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • kills[i] Less than 6
        • Then - Actions
          • Game - Display to pgroup for 5.00 seconds the text: (Footmen killed: + (String(kills[i])))
        • Else - Actions
          • Game - Display to pgroup for 5.00 seconds the text: Quest complete.
          • Hero - Add 1000 experience to u, Show level-up graphics
      • Custom script: call DestroyForce(udg_pgroup)
 

Attachments

  • QuestKills.w3x
    13.3 KB · Views: 25
Level 3
Joined
Dec 27, 2012
Messages
36
Yea your trigger works perfectly if you don't mind ill use it cuz i have no idea what should i do with mine. Thanks dude :D
 
Status
Not open for further replies.
Top