help with a trigger please!!!

R

roluo

Guest
hi all, im making a map and i cannot figure out how to make a trigger that can do something like if a player gets 25 kills then creat a unit for that player, and its applied for all players, at a certain number of kills please help!!:confused:
 

Trithilon-V2

New Member
Reaction score
20
make an integer array named "Kills" or whatever of size 12.

now do this.

Code:
Event - A Unit Dies
Condition - (what ever you want)
Actions -
If - Kills[(Convert Player to Player Number (Owner of Unit (Triggering Unit)))] = 25
Then - 
Set -
Unit - Create (Your Unit)
Else - Kills[(Convert Player to Player Number (Owner of Unit (Triggering Unit)))] = 0
Set - Kills[(Convert Player to Player Number (Owner of Unit (Triggering Unit)))] = (Kills[(Convert Player to Player Number (Owner of Unit (Triggering Unit)))] + 1)

So, basically, we store each players kill in each array depending upon player number.
When a unit kills another unit, we check who the unit belongs to. We derive the owners player number.
We use that player number to store and retrive the kills from and into the Kills integer array.
When the Kills for a player reach 25, we just create the unit for him and reset the counter of the Kills in the array to zero.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top