How to award 1 lumber for every 2 unit kills

Thunder_Lord

New Member
Reaction score
0
I am making a footmen frenzy map and i am putting in a new tier.
In my map one lumber is awarded to a player for every unit that player kills, it is programmed in with a trigger for a multiboard that counts unit kills

I am putting in a new tier that spawns units two times as fast but they are half as powerful

So i need a trigger that will award ONE lumber for every TWO "Militia" a player kills if someone could post something I could use I would appreciate it very much, Thanks
 

0_Flip

New Member
Reaction score
2
Event:
a unit dies
Condition:
unit type of dying unit equal to militia
Actions:
set GlobalIntegerVariable[Player number of (owner of(killing unit))] = GlobalIntegerVariable[Player number of (owner of(killing unit))] +1
if (GlobalIntegerVariable[Player number of (owner of(killing unit))] mod 2) == 0
then
add lumber :D
else
 

Komaqtion

You can change this now in User CP.
Reaction score
469
This should work for you ;)

Trigger:
  • Add Lumber
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Militia
    • Actions
      • Set AddLumber[(Player number of (Owner of (Killing unit)))] = (AddLumber[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AddLumber[(Player number of (Owner of (Killing unit)))] Greater than or equal to 2
        • Then - Actions
          • Player - Add 1 to (Owner of (Killing unit)) Current lumber
          • Set AddLumber[(Player number of (Owner of (Killing unit)))] = 0
        • Else - Actions
 

HydraRancher

Truth begins in lies
Reaction score
197
This should work for you ;)

Trigger:
  • Add Lumber
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Militia
    • Actions
      • Set AddLumber[(Player number of (Owner of (Killing unit)))] = (AddLumber[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AddLumber[(Player number of (Owner of (Killing unit)))] Greater than or equal to 2
        • Then - Actions
          • Player - Add 1 to (Owner of (Killing unit)) Current lumber
          • Set AddLumber[(Player number of (Owner of (Killing unit)))] = 0
        • Else - Actions

Actually, you have to modify that abit (Ouch!).

Trigger:
  • Set AddLumber[(Player number of (Owner of (Killing unit)))] = 0


Should Be:

Trigger:
  • Set AddLumber[(Player number of (Owner of (Killing unit)))] = (AddLumber[(Player number of (Owner of (Killing unit)))] - 2)


Incase of AOE spells that kill multiple.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top