Item Ability Help

S

Stupidmouse

Guest
Im tring to make an ability that activates when you have low hp like under 250 or 25% something like that. I want the ability to give the unit an extra 5 armor then take it away when he goes above that 250 or 25% hp line. I realize it will probably have to use triggers but im unsure exactly how to do it. Anyone try something like this before?
 
If you want this to be done with items, you need 2 items, one that do nothing and one that gives the 5 armor bonus.
Event
A unit uses an item.
Condition
Item being manipulated is equel to "The do nothing item"
Actions
If, then, else
If
Life of triggering unit is less than 250/25%
Then
Remove "The Do Nothing Item" from triggering unit"
Add "The real Item" to triggering unit
Else
Remove "The real item" from triggering unit
Add "The do nothing item" to triggering unit

You could also get the invetory spot where the real and do nothing items are placed, but that takes some more work. Notice that the Condition is a Item-type comparision, and the if is a Real comparision
 
Thats not what i want really, sorry if i was unclear before. I want the item to basically to autocast when hp is low. After playing around a bit more i think that its not possible to do with the normal TFT editor. But with WEU there are a couple triggers that look promising. Im still working on it though in case anyone has any hints.
 
But with WEU there are a couple triggers that look promising.

YAY I think someone read the FAQ! :)

What you are asking is quite tough, that is about all I can say for now.
 
Problem Solved

Basically what the unregistered guest said was right except for the event. You need 2 items to make it work right. i used copy of the itemarmorbonus ability. To make this work for your map:

BTW this trigger activates an item ability when your hitpoints are low.

Protection Ring
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to Playersherounit[(Player number of (Owner of (Triggering unit)))]
Or - Any (Conditions) are true
Conditions
(Item-type of (Item carried by (Attacked unit) in slot 1)) Equal to Protection Ring FAKE
(Item-type of (Item carried by (Attacked unit) in slot 2)) Equal to Protection Ring FAKE
(Item-type of (Item carried by (Attacked unit) in slot 3)) Equal to Protection Ring FAKE
(Item-type of (Item carried by (Attacked unit) in slot 4)) Equal to Protection Ring FAKE
(Item-type of (Item carried by (Attacked unit) in slot 5)) Equal to Protection Ring FAKE
(Item-type of (Item carried by (Attacked unit) in slot 6)) Equal to Protection Ring FAKE
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Triggering unit)) Less than or equal to ((Max life of (Triggering unit)) x 0.25)
Then - Actions
Game - Display to (Player group((Owner of (Attacked unit)))) the text: Protection activated
Item - Remove (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] of type Protection Ring FAKE)
Hero - Create Protection Ring Real and give it to (Triggering unit)
Else - Actions
Do nothing

Playersherounit is a unit varible array in my map that stores the hero for each player. First condition is only there to make sure that the unit attacked is a hero since lots of units get attacked on a map. You probably can get away with not having this condition since other units cant carry items. Then you need to reverse (shown below) this when hp goes above 25% of max. Now the Protection will only deactivate when unit is attacked if you just reverse this trigger, for me that is ok because extra armor when your not being attacked is ok, but you can add a couple events like item used equal to heath potion or when a healing ability is used. THen you can have it check hp and shut off when you want it to.

Protection Remove
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to Playersherounit[(Player number of (Owner of (Triggering unit)))]
Or - Any (Conditions) are true
Conditions
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 1)) Equal to Protection Ring Real
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 2)) Equal to Protection Ring Real
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 3)) Equal to Protection Ring Real
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 4)) Equal to Protection Ring Real
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 5)) Equal to Protection Ring Real
(Item-type of (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] in slot 6)) Equal to Protection Ring Real
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Triggering unit)) Greater than ((Max life of (Triggering unit)) x 0.25)
Then - Actions
Game - Display to (Player group((Owner of (Attacked unit)))) the text: Protection deactivated
Item - Remove (Item carried by Playersherounit[(Player number of (Owner of (Triggering unit)))] of type Protection Ring Real)
Hero - Create Protection Ring FAKE and give it to (Triggering unit)
Else - Actions
Do nothing


I hope i made this clear if not ill answer any questions. Hey Darg you may want to put this up in the free trigger code, this may be useful to somebody.
 
yea u may not be even making maps any maps any more i think i may retire it is too much work for me but u guys make it way easier caus ei have been working from 8 a.m. to about 9 p.m. without eating most of the time making my maps especially this one and it has been months but i have been doing that only for about a week now cause i said i would release my map in june and it is june so i need to finish it up this month yea i have a few things left i probaly will finish in less than a week thanks to this site Darg and Sd_Ryoko so i guess i will read the whole faq and i thought about making new terain and destructable and times that i could use in any map so if u have any suggestions for item let me know

ps. take that for a long message Darg lol
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Today I had to scramble, I didn't work most of dinner service and no one told me shit. They had a rough few hours lol
  • Varine Varine:
    I have two salmon, Sockeye and Atlantic. Atlantic is used for the kids salmon and the salmon and beet salad, and can also be added onto any dish or just as a side. Atlantic salmon will almost exclusively ever be FARMED, as it is endangered in the wild, and we ALWAYS cut them to 4 ounces.
  • Varine Varine:
    SOCKEYE salmon, very different and this IS wild caught. We have an ENTREE version, and an add on version. The entree is 7 ounces, the add on is 4. Why? Because that is how someone that wasn't me set up the computer.
  • Varine Varine:
    I had to have this conversation like ten fucking times tonight
  • Varine Varine:
    The issue being, I came into work and had none of this whatsoever
  • Varine Varine:
    No one told me shit
  • Varine Varine:
    So, taking into consideration that what I typed out up there is kind of some fucking nonsense that under normal circumstances no one really needs to fucking be able to explain in any rational way
  • Varine Varine:
    Let alone trying to figure it out from a wildly stressed out me that is also on a phone call trying to get something to show up from Seattle tomorrow while trying to explain this salmon situation, that also is barely solved in maybe a few hours and and but I am bulking it with a few steelhead filets I have and that is a WHOLE fucking different thing to the 19 year old server that got put on day shift C crew that doesn't know who I am.
  • Varine Varine:
    I did however really want days. I like getting off at 4 half the time, and that makes it worth it!
  • Varine Varine:
    Also I hate my job right now but I think that was the hard part. Now it's just work
  • Varine Varine:
    @jonas I'm sorry? I don't know what you're referring to.
  • Varine Varine:
    Once we hit winter I feel like I get to back to having a pretty cool job. Like I bitch about it all the time, but it's work. I'm still gonna bitch
  • Varine Varine:
    All in all though I think this summer is going really well. Some complicated things, but at the end of the day it isn't THAT big of a deal. Not all of our servers have quite realized they are technically sales
  • Varine Varine:
    Like yeah it is a substitute, but FOMO. Chef isn't getting this again this year, he has to figure it out, so it's slightly off on the menu, but that is more or less the LOWEST quality and price. Right now, steelhead is a real stealhear, right?
  • Varine Varine:
    Like fuck off even I can do it
  • Varine Varine:
    I am going to get one of my servers to do that in her server voice and you'll see my point
  • Varine Varine:
    Maybe the bartender. Idk, it's one of my favorite things to hear them go from calm to customer service voice. They will translate it to like "The chef is trying to change that a bit right now so he does have a Alaskan river steelhead. Yeah like the one you might fish probably!" And then the girls can bat their eyes and do pretty girl server shit
  • Varine Varine:
    At least that's how imagine some of them. Did you know mayonnaise is dairy free? A suprisingly amount of people don't\
  • The Helper The Helper:
    mayo is eggs right?
  • The Helper The Helper:
    Seems I never watched the Witcher - looks like i have a lot of content
  • The Helper The Helper:
    Season 1 Episode 8 the marathon continues...
  • jonas jonas:
    mayo is eggs & oil
    +1
  • The Helper The Helper:
    I got halfway season 2 on The Witcher and it lost me. I am going to have to pick this one up again later.
  • jonas jonas:
    season 2 is with the new actor right? it's so far below the first one
  • The Helper The Helper:
    first season was good the 2nd season is bleh I hope I can make it through it for 3

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top