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

Status
Not open for further replies.

007

007

Level 6
Joined
May 3, 2009
Messages
175
i want to make a trigger so that if a player has a multiple of 100 kills (100,200,300...) he recieves 1 lumber? anyone know how to do it? and is it also posiible to use one trigger in which i can include all players?
 
  • trigger
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Kills[Player Number of (Owner of (Killing unit))] = (Kills[Player Number of (Owner of (Killing unit))]) + 1)
    • If (All Conditions are true) then do (Actions) else do (Actions
      • If - Conditions
        • Kills[Player Number of (Owner of (Killing unit))] Equal to 100
      • Then - Actions
        • Player - Add 1 to (Owner of (Killing unit)) current lumber
        • Set Kills[Player Number of (Owner of (Killing unit))] = 0
      • Else - Actions
 

007

007

Level 6
Joined
May 3, 2009
Messages
175
i thought about that way too but i have a board which dislpays the kills of all mplayers and i dont want it to be set to 0.
 

007

007

Level 6
Joined
May 3, 2009
Messages
175
but now im a bit confused. how can i make that i can add something to the variable like "[Player Number of (Owner of (Killing unit))]" just like you did it in that picture. or am i just doing it wrong and the "kills" isnt a variable made by you?
 

007

007

Level 6
Joined
May 3, 2009
Messages
175
i mean the " Kills[Player Number of (Owner of (Killing unit))] ". is that the whole name of the variable. i think not because i cant call it sth like " [ ". but in the trigger editor i choose set variable then for the firdt variable i choose "kills" which i made. but then i didnt do anything about the player who has killed the units. i dont know how to mkae that with my own variable.
 
Well, i thought you knew that:
The variable name is just "Kills". Then, in the window you create the variable, you need to tick that little thing called "Array". Once ticked, if you set the Kills variable, it will look like this: Kills[Index]. Press the "Index", scroll down to "Player - Player Number", press it, and then in the new window, scroll to "Owner of", and change "Triggering unit" to "Killing unit". That's it.
 
Status
Not open for further replies.
Top