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

[Trigger] Hero get Xp

Status
Not open for further replies.
Level 8
Joined
Aug 19, 2007
Messages
294
I need help with this tigger - can any make a tigger that works

HELP ME PLZ
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Arcane Vault
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Unit-type of (Picked unit)) Equal to Kil'jaeden) and ((Unit-type of (Picked unit)) Equal to Dreadlord)
        • ((Unit-type of (Killing unit)) Equal to Kil'jaeden) or ((Unit-type of (Killing unit)) Equal to Dreadlord)
      • Then - Actions
        • Unit Group - Pick every unit in (Units in the map <gen>) and do (Actions)
          • Loop - Actions
        • Hero - Add 1000 experience to (Picked unit), Hide level-up graphics
      • Else - Actions
        • Do nothing
 
Last edited by a moderator:
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Events
    • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Arcane Vault
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Killing unit)) Equal to Kil'jaeden) or ((Unit-type of (Killing unit)) Equal to Dreadlord)
        • Then - Actions
          • Hero - Add 1000 experience to (killing unit), Hide level-up graphics
        • Else - Actions
You mean like this ?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Footman
    • Actions
      • Custom script: bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Footman) or ((Unit-type of (Matching unit)) Equal to Footman))) and do (Actions)
        • Loop - Actions
          • Hero - Add 1000 experience to (Picked unit), Hide level-up graphics
You could also add a condition of the killing unit like you did in your trigger.
 
Level 8
Joined
Aug 19, 2007
Messages
294
this is a error Custom script: bj_wantDestroyGroup = true

shall i doo some thing for this will work

Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Footman
Actions
Custom script: bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Footman) or ((Unit-type of (Matching unit)) Equal to Footman))) and do (Actions)
Loop - Actions
Hero - Add 1000 experience to (Picked unit), Hide level-up graphics
 
Level 8
Joined
Aug 19, 2007
Messages
294
if i say -kill the farm will be killed

  • TEST
    • Events
      • Player - Player 1 (Red) types a chat message containing -kill as An exact match
    • Conditions
      • (Unit-type of (Picked unit)) Equal to Farm
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You must understand that Picked Unit only works after you actualy PICK a unit group.

It should look like this:
  • Unknown
    • Events
      • Player - Player 1 (Red) types a chat message containing -kill as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Footman)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
 
Status
Not open for further replies.
Top