Ability cooldown reset IF it kills a unit. help

Exoudar

New Member
Reaction score
2
hi there,

I am trying to make my ability (firebolt) reset its cooldown if it kills a unit.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i believe there is no way to reset ability cooldowns unless you reset all of them, and if im correct there is an action for it...
the problem is you will need a damage detection system :/
 

Exoudar

New Member
Reaction score
2
I can remove it and add it again to reset specific ability, but i want that to happen only if the ability land a killing blow (kills unit)
 

Dirac

22710180
Reaction score
147
Trigger the firebolt as a missile, on hit, if the unit is dead after it takes the damage, then re-add the ability
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
I made this, but it won't work the first time it's supposed to kill a unit. I forget how to get around that.
 

Attachments

  • Firebolt.w3x
    24.4 KB · Views: 278

Extes

Cool Member
Reaction score
5
Mind if I use this idea? I'm making an RPG and for one of the characters I wanted a similar ability. It'd be melee though.
 

Exoudar

New Member
Reaction score
2
I tried this and it works, the problem is when it is used against units with spell resistance(heroes for example)


Reseting Firebolt
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Firebolt (Mage)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Target unit of ability being cast)) Less than or equal to 50.00
Then - Actions
Set testunit = (Casting unit)
Wait 0.50 seconds
Unit - Remove Firebolt (Mage) from testunit
Unit - Add Firebolt (Mage) to testunit
Else - Actions


my firebolt does 50 damage, so it will reset when it hits units with 50 or less damage (assuming it kills them most of the time)

however spell resistance units will make a problem :(
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
What about the missile? If the unit teleports away while the missile is flying, the effect is preempted. Same goes for Immunity-granting abilities.
 

cleeezzz

The Undead Ranger.
Reaction score
268
easiest way to do it without triggering the fireball itself is probably:

you will need a unit indexing system, like AIDS [EDIT: nevermind, forgot about hashtables]

-Make firebolt a dummy spell (spell that does nothing)
-Detect unit casting firebolt
-Create a dummy to cast the real firebolt at the same target (a specific dummy, call it Firebolt Dummy or something)
-Set a variable (Unit array), example -> Caster[Custom value of (Dummy)] = Triggering Unit
-Make a new trigger with event, Firebolt Dummy kills a unit
-Remove Firebolt ability from Caster[Custom value of (Triggering Unit)]
-Add Firebolt ability to Caster[Custom value of (Triggering Unit)]

(Remember to give your dummies expiration time or remove them)
 

Exoudar

New Member
Reaction score
2
easiest way to do it without triggering the fireball itself is probably:

you will need a unit indexing system, like AIDS

-Make firebolt a dummy spell (spell that does nothing)
-Detect unit casting firebolt
-Create a dummy to cast the real firebolt at the same target (a specific dummy, call it Firebolt Dummy or something)
-Set a variable (Unit array), example -> Caster[Custom value of (Dummy)] = Triggering Unit
-Make a new trigger with event, Firebolt Dummy kills a unit
-Remove Firebolt ability from Caster[Custom value of (Triggering Unit)]
-Add Firebolt ability to Caster[Custom value of (Triggering Unit)]

(Remember to give your dummies expiration time or remove them)



can you please explain more and show me how its done in world editor
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
-Make firebolt a dummy spell (spell that does nothing)
base this off finger of pain with 1 damage (so that it's still castable on enemies, i believe its not if you dont have at least 1 dmg)
-then make a firebolt dummy unit (unit with locust and the real firebolt ability with unlimited range)
then do this:
Trigger:
  • Firebolt reset
    • Events
      • A unit casts an ability
    • Conditions
      • Ability cast is equal to Firebolt (based off finger of pain)
    • Actions
      • Set Temp_Point = Position of (Triggering unit)
      • Unit - Create 1 (Firebolt Dummy Unit) at Temp_Point facing default building facing degrees
      • Unit - Order Last created unit to (Order String of Firebolt (actual ability that deals the 50 damage)) Target unit of Ability Cast
      • Unit - Add a 5.0 second expiration timer to Last Created Unit
      • Hashtable - Save (Triggering unit) as (key Last Created unit) of 0 in Last Created Hashtable (must be made at map init and either saved to a variable or only 1 be made)
      • Custom Script: call RemoveLocation(udg_Temp_Point)


Trigger:
  • Firebolt Unit Dies
    • Events
      • A unit Dies
    • Conditions
      • Unit Type of (Killing unit) is equal to Firebolt Dummy unit
    • Actions
      • Set Temp_Unit = Hashtable load unit (key Killing unit) of 0 in Last Created Hashtable (or whatever hashtable you are using)
      • Unit - Remove Firebolt (real ability) from Temp_Unit)
      • Unit - Add Firebolt (real ability) to Temp_Unit)


thats using 0 extra systems
 

cleeezzz

The Undead Ranger.
Reaction score
268
nice, i forgot about hashtables, i stopped coding as that patch came out

got used to using indexing as an alternative
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i MUCH prefer indexing, as it is is much faster to use a regular variable, but the problem is that a lot of people dont understand or dont use indexing (making their life harder as well as mine when i try to help) but at least its possible without it
 

Exoudar

New Member
Reaction score
2
-Make firebolt a dummy spell (spell that does nothing)
base this off finger of pain with 1 damage (so that it's still castable on enemies, i believe its not if you dont have at least 1 dmg)
-then make a firebolt dummy unit (unit with locust and the real firebolt ability with unlimited range)
then do this:
Trigger:
  • Firebolt reset
    • Events
      • A unit casts an ability
    • Conditions
      • Ability cast is equal to Firebolt (based off finger of pain)
    • Actions
      • Set Temp_Point = Position of (Triggering unit)
      • Unit - Create 1 (Firebolt Dummy Unit) at Temp_Point facing default building facing degrees
      • Unit - Order Last created unit to (Order String of Firebolt (actual ability that deals the 50 damage)) Target unit of Ability Cast
      • Unit - Add a 5.0 second expiration timer to Last Created Unit
      • Hashtable - Save (Triggering unit) as (key Last Created unit) of 0 in Last Created Hashtable (must be made at map init and either saved to a variable or only 1 be made)
      • Custom Script: call RemoveLocation(udg_Temp_Point)


Trigger:
  • Firebolt Unit Dies
    • Events
      • A unit Dies
    • Conditions
      • Unit Type of (Killing unit) is equal to Firebolt Dummy unit
    • Actions
      • Set Temp_Unit = Hashtable load unit (key Killing unit) of 0 in Last Created Hashtable (or whatever hashtable you are using)
      • Unit - Remove Firebolt (real ability) from Temp_Unit)
      • Unit - Add Firebolt (real ability) to Temp_Unit)


thats using 0 extra systems


You sir are genius, you give me a big help, thank you.
 

Exoudar

New Member
Reaction score
2
lol... thanks, no im not, and no problem :D

while we at it, how to promote a unit (increasing its attack) if it kills 10+ kills (second promote 20+ kills)

I can do variable based on item ability (claws) and increase it each time the unit kills an enemy, after 10 kills it get +5 damage.


problem is all unit with same unit-type will get promoted and not only the one who killed.


any ideas?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
Here it is but you will need some conditions if you dont want to add it to heroes or other unit types
Trigger:
  • Promotions
    • Events
      • A unit dies
    • Conditions
      • Killing unit is not equal to No unit is true (boolean i think, maybe unit comparison)
    • Actions
      • Hashtable - Save Integer ((Load Integer - (Key (Killing unit)) of 1 in Hashtable) + 1) as (Key (Killing unit)) of 1 in Hashtable
      • If then else
        • If
          • (Hashtable Load integer (Key (Killing unit)) of 1 in Hashtable) is equal to 10
        • Then
          • Hashtable - Save Integer 0 as (Key (Killing unit)) of 1 in Hashtable
          • Unit - Add ability (modified claws of attack to meet your needs)
        • Else
 

Exoudar

New Member
Reaction score
2
Here it is but you will need some conditions if you dont want to add it to heroes or other unit types
Trigger:
  • Promotions
    • Events
      • A unit dies
    • Conditions
      • Killing unit is not equal to No unit is true (boolean i think, maybe unit comparison)
    • Actions
      • Hashtable - Save Integer ((Load Integer - (Key (Killing unit)) of 1 in Hashtable) + 1) as (Key (Killing unit)) of 1 in Hashtable
      • If then else
        • If
          • (Hashtable Load integer (Key (Killing unit)) of 1 in Hashtable) is equal to 10
        • Then
          • Hashtable - Save Integer 0 as (Key (Killing unit)) of 1 in Hashtable
          • Unit - Add ability (modified claws of attack to meet your needs)
        • Else

didn't work :/
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
when i get home ill check in the editor, that and the previous ability were freehand
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top