Could you explain more please :STrigger the firebolt as a missile, on hit, if the unit is dead after it takes the damage, then re-add the ability
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)
-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
while we at it, how to promote a unit (increasing its attack) if it kills 10+ kills (second promote 20+ kills)lol... thanks, no im not, and no problem![]()
didn't work :/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