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

Simple trigger

Status
Not open for further replies.
Level 1
Joined
Apr 18, 2006
Messages
1
Ok so i'm no good at triggers, I would like to ask someone to, well instead of making me a trigger tell me how to make it. I want a set up where every 50 kills a player makes he/she would receive 1 peice of lumber. Please be in-depth if it's not too much trouble as, again im not really that good with triggers.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Variables (you can edit those by pressing cntrl + B in the trigger editor)

Name: Variable (pick another name if you wish)
Type: Integer
Array: 12 (One for each player)
Initial Value: 0


Triggers

Trigger 1
Event: A unit dies
Condition: None (unless you only want E.g. neutral hostile kills to be counted...)
Action: Set Variable [(Player number of (Owner of (Killing unit)))]
= Variable [(Player number of (Owner of (Killing unit)))] + 1

Trigger 2
Event: a unit dies
Condition: Integer Comparison - Variable [(Player number of (Owner of (Killing unit)))] Equal to 50
Action: Set Variable [(Player number of (Owner of (Killing unit)))] Equal to 0
Add 1 to (Owner of (Killing unit))'s current Lumber
 
Status
Not open for further replies.
Top