• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Dota like spell/item: chain lighting on attack

Status
Not open for further replies.
1. Spell like from dota: maelstorn, on attaclk there is chance that attacker will "cast" chail lightning, but in my map, I must order unit to attack enemy so spell will be casted. Problem is that that spell is used in td by plenty towers, and it would be really stupid if I would have to order tower. Please share solution, best it would be if I dont need to code, If I must I know how to fix problem myself.
I am using orb of slow/blod edited so it doesnt slow, then it casts chain lightning.
 
Now I see you edited :).
So far I have no luck with editing.
I tried this:
unit is attached
unit type of attacking unit is static tower
order attacking unit to attack attacked unt

this works but only second attackon the unit. For excample unit must be attacked once, and then every next attack will be casted spell. If unit is attacked once and then other unit is attacked, this resets and first unit again have to be attacked twice.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
You can make a trigger when: A unit is attacked equal to your unit. Now for condition make a random integer from 1 to any number greater than 1 so it will have a chance.
For the last part action, you must create a dummy at position of the attacked unit and it must be invisible has unlimited mana, and has Locust ability. Now give it the ability Chain Lightning and order it to cast to the attacking unit.

Remove dummy unit and there =) Just dont turn off the trigger so it can be reused if someone activated the effect again.

Things to consider:
  • Dummy Unit should be kept on a vraiable to save information and not to use Last Created Unit that is quite risky. Because there is many possible units for Last Created Unit.
  • Dummy must be invisible, has Locust ability to make it unclickable and unlimited mana so it can cast any skills.
  • Mostly the damage outcome of the PAS Chain Lightning will come to the Chain Lightning that the dummy cast so edit also the damage of the Chain Lightning.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Hellmaster, I am doing simple map, and I wont do that, if I had to that would be my last solution.
Doom, checked what they told, but it is late here, and will take closer look tomorrow.
Now have to sleep zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzZZZZZZZZZZZZZZZZZZZZZZZZZ.

Other option is to give unit Orb of Lightning and set ability to Chain Lightning but many said it is quite buggy.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Use Orb Of Lightning (OOL) + "A unit acquires a target" and order the triggering unit to attack the target.

Else, dettect "A unit is attacked", add your chances and conditions, and create a dummy to cast the chain lightning on the target.
 
Sometime you have to be lazy and smart.
30% chance to proc is like 30% of the time.What I would do the lazy way is giving chainlightning ability to the tower and order it to cast chain lightning instead of attacking vie -a unit is attacked- and give the ability a cooldown that is 3 times the attack cooldown so it's close to 30% of the time.
Weak coding required and functional.
 
Use Orb of Darkness. Set its Active Ability to your custom Chain Lightning. Voila.

0% Coding is needed.

http://www.hiveworkshop.com/forums/...passive-ability-cooldown-attack-based-211589/

In that tut, Orb of Lightning is used, but I always use Orb of Darkness. They are both the same anyways.

Almia, if you have readed carefuly, you would see that I am using that spells, so your answer is useless/just repeating what I told.
Spartilos I will use your, but it looks like that I have to add event when ever unit enters map right?
Spartilos
 
Level 8
Joined
Apr 23, 2011
Messages
322
what about this:
use bribe's or looking_for_help's damage detection.
unit is damaged, damager=your tower,
  • (Random real number between 1.00 and 100.00) Less than or equal to 30.00
, set point at damaging unit and create a locust invulnerable dummy for owner of tower, add 0.5 exp timer to dummy, add chain lightning to dummy, order dummy to orc seer-chain ligh damaged unit.
notes:dummy model ".mdl", can't raise does not decay, cast point=0, dummy's MS=0 collision=0 flying height 200 (depending of tower's height)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
No need to add every unit to event. There's a Generic Unit event for "Acquires a target" and event response objects for Triggering Unit and Acquired Target
 
Status
Not open for further replies.
Top