Help wih trigger add/remove item

Tinker

New Member
Reaction score
1
Hi guys this trigger isnt working pls help

Trigger:
  • Armor Gain
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has buff Armor Gain ) Equal to True
    • Actions
      • Set AG_KillingUnit = (Killing unit)
      • Unit - Add Item Armor Bonus (+1) to AG_KillingUnit
      • Countdown Timer - Start Timer15 as a One-shot timer that will expire in (1.00 + ((Real((Level of Armor Gain for AG_KillingUnit))) x 0.25)) seconds


It should add 1 armor for each unit killed but it remains 1 even if i kill 3200 units at the same time, and it removes 1....

i want it to add 1 for each killed unit and then remove 1

ie. if it is 6 the time expires and it becomes 5, dunno if i explain...

This is the remove trigger if u mind

Trigger:
  • Armor Remove
    • Events
      • Time - Timer15 expires
    • Conditions
    • Actions
      • Unit - Remove Item Armor Bonus (+1) from AG_KillingUnit
 

Ishida

New Member
Reaction score
1
Because it's only adding 1 armor. It doesn't add multiple.

Use an array, and add the armor based on the array.. or an int wwould be better

Set ArmorBonus = ArmorBonus + 1;

Then add Armorbonus, instead of the item shit
 

drol

New Member
Reaction score
7
I cant use arrays :/ can you make an explain trigger pls?
You should change the armor ability so that it has multiple levels, then set the armor for each level.

Then in your trigger you can set the level of the ability + 1 each time the unit kills someone.
 

Tinker

New Member
Reaction score
1
7I tried using these 3 triggers and starting the countdown repeatly... it works but only if you arent killing any unit, it doesnt decrease while im still killing units

Trigger:
  • Armor Gain 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has buff Armor Gain ) Equal to True
    • Actions
      • Set AG_KillingUnit = (Killing unit)
      • Unit - Add Item Armor Bonus (+1) to AG_KillingUnit
      • Trigger - Turn on Armor Gain <gen>
      • Trigger - Turn off (This trigger)


Trigger:
  • Armor Gain
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has buff Armor Gain ) Equal to True
    • Actions
      • Unit - Set level of Item Armor Bonus (+1) for AG_KillingUnit to ((Level of Item Armor Bonus (+1) for AG_KillingUnit) + 1)
      • Countdown Timer - Start Timer15 as a Repeating timer that will expire in (1.00 + ((Real((Level of Armor Gain for AG_KillingUnit))) x 0.25)) seconds


Trigger:
  • Armor Remove
    • Events
      • Time - Timer15 expires
    • Conditions
    • Actions
      • Unit - Set level of Item Armor Bonus (+1) for AG_KillingUnit to ((Level of Item Armor Bonus (+1) for AG_KillingUnit) - 1)


Pls help me to make it work properly and as i said.

I want it to decrease armor while im gaining it... not while im not gaining any armor or killing any units, dunno if i explain.
This trigger is restarting the countdown everytime i kill an unit, and that is bad for what i need.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
  • C cubanismo:
    Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
    +2
  • The Helper The Helper:
    One can only wish!
  • tom_mai78101 tom_mai78101:
    I'm back from Taiwan
    +1
  • The Helper The Helper:
    I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
  • The Helper The Helper:
    and the real archive lives off of headline news
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Saturday Night!
    +1

    The Helper Discord

    Staff online

    • K3V
      NUON-Dome Moderator

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top