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

Items after an specific amount of kills

Status
Not open for further replies.
Level 18
Joined
Mar 7, 2005
Messages
824
I have made a variable that counts the kills for each player after u have 5000 kills u get an item.. but i dont know which triggers i must use for that.
then the item is be given to the builder, that builder has for sure an inventar...

this is what i have done:

-pick all players:
-Set kills[player number of (picked player)] = 0

then in another trigger:

event:
-a unit dies

Condition:
- owner of dying unit equal to player 12 (for example)
- owner of killing unit equal to player 1 (for example)

action:
- pick all players
- set kills[player number of (picked player)] = kills[playernumber of (picked player)] + 1

after that i tried some things but dont know if one of the players have 5000 which triggers i have to use that only this player get the item for his hero....

thx in advance
 
Level 7
Joined
Jul 30, 2004
Messages
451
Tr!KzZ said:
I have made a variable that counts the kills for each player after u have 5000 kills u get an item.. but i dont know which triggers i must use for that.
then the item is be given to the builder, that builder has for sure an inventar...

this is what i have done:

-pick all players:
-Set kills[player number of (picked player)] = 0

then in another trigger:

event:
-a unit dies

Condition:
- owner of dying unit equal to player 12 (for example)
- owner of killing unit equal to player 1 (for example)

action:
- pick all players
- set kills[player number of (picked player)] = kills[playernumber of (picked player)] + 1

after that i tried some things but dont know if one of the players have 5000 which triggers i have to use that only this player get the item for his hero....

thx in advance

you know that trigger you wrote will increase EVERYONEs kills when only ONE player kills a unit...

and the ones you are looking for is
if (kills[player number of owner of killing unit] > 5000) then
-- create item at location X
-- give last created item to builder
 
Status
Not open for further replies.
Top