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.
  • jonas jonas:
    Which company do you work for?
  • vypur85 vypur85:
    Haha yea they'd compare my country as well...
  • vypur85 vypur85:
    Hmm i don't receive any pm? Maybe I'm using my phone. Gonna check it out using my pc later.
  • vypur85 vypur85:
    I'm teaching A Levels in a school in Wuhan.
  • jonas jonas:
    You should see a "private conversations" tab in the chatbox, that's where I sent it to you
    +1
  • jonas jonas:
    Wow
  • jonas jonas:
    Is the school system in your country similar to Chinese school system? I could never imagine being a teacher in a Chinese school, what's expected of students and teachers is just so different from what I'd be looking for as a teacher
  • vypur85 vypur85:
    A Levels is based on the UK syllabus offered internationally. So the syllabus is similar throughout different countries, taught in english.
  • vypur85 vypur85:
    I can't speak or write or read much chinese... Too difficult....... Which also makes my life here in china a lil difficult.
  • jonas jonas:
    Oh, I see. I thought Chinese version of A-levels :D
  • jonas jonas:
    I've been using the translate app a lot on my phone. take a photo, translate. take another photo, translate again :D
  • jonas jonas:
    it also has voice translation, my colleagues sometimes use that
  • jonas jonas:
    You came during the 0 covid policy right? How'd you get through quarantine? Did you have some help with the apps and green codes?
  • tom_mai78101 tom_mai78101:
    If you have any Chinese you need help with, let me know.
  • vypur85 vypur85:
    @jonas Those were the things I did too. Translate app and VPN are always the most important things to have to survive. Lol.
  • vypur85 vypur85:
    Yea I came last year. I was quarantined for about 30 days. Fml. The first day of my quarantine was the eve of Chinese new year last year. Fml again... Lol.
  • vypur85 vypur85:
    @tom_mai78101 IIRC you're from Taiwan right.
  • The Helper The Helper:
    I thought China had cracked down on having any foreign teachers?
  • vypur85 vypur85:
    Yeah I've heard of the news before. My school is still actively hiring foreign teachers. Not sure how things work now.
  • The Helper The Helper:
    yeah it is hard to get reliable information about that kind of stuff
  • The Helper The Helper:
    but you are doing it so it is still doable
  • vypur85 vypur85:
    I think it doesn't affect existing foreign teachers. Then again, its still weird that my school is hiring.
  • The Helper The Helper:
    Happy Monday people hope everyone has a fantastic week!
  • Ghan Ghan:
    Happy Monday?! That's a contradiction.

    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