• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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