• 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.

Chain lightning release on attack?

Status
Not open for further replies.
Level 4
Joined
Feb 27, 2011
Messages
22
I havent found a topic or something that containts the idea to create a chain lightning on attack like Mjonnir in DotA.Does anybody have an idea how is this spell made in JASS?
Im sorry once again if i didnt look but I didnt find any thread about this in the site.
 
Level 11
Joined
Jul 7, 2010
Messages
709
I am not sure if this is what you'r looking for but:
  • Chain Tower
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to (==) Chain Lightning Tower
    • Actions
      • Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)
 
The problem with Orb effects is you have to actually be attacking or attack moving for the effects to come into play. Should your unit be stationary, the effect will not work. Trust me, it's guranteed.

Additionally, using the 'unit is attacked' event is dodgy, as it will come into effect before you actually attack. In this case it shouldn't matter, though.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The problem with Orb effects is you have to actually be attacking or attack moving for the effects to come into play. Should your unit be stationary, the effect will not work. Trust me, it's guranteed.

Additionally, using the 'unit is attacked' event is dodgy, as it will come into effect before you actually attack. In this case it shouldn't matter, though.

What are you talking about man... ?
It's not even scripted (doesn't touch Trigger Editor), so there's no need the use of "Unit Is Attacked" and such lol
 
Level 8
Joined
Mar 26, 2009
Messages
301
The problem with Orb effects is you have to actually be attacking or attack moving for the effects to come into play. Should your unit be stationary, the effect will not work. Trust me, it's guranteed.

Additionally, using the 'unit is attacked' event is dodgy, as it will come into effect before you actually attack. In this case it shouldn't matter, though.

Correct. To check if unit is actually attacked or not (projectile launched, hit the target etc..)
1-) I used to create an orb of corruption based ability, give it to the attacker and,
2-) Disable it with triggers instantly so it takes no space in UI.
3-) Then I remove the effect (armor reduce) from it.
4-) After that, I create a new buff named "Physical Attack" (editor name only) but I remove icons and special effects from it so it wont show up in attacked unit's status bar,
5-) Then I create a trigger that checks if unit has buff or not every 0.05 seonds.
6-) If attacked unit has the buff, I create a dummy to cast the lightining.
If author of the topic is willing to prevent that problem from occuring, he can use this =)
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
OR, just use Weep's GUI Damage Detection and trigger yourself the ability of Chain Lightning
I made it that the tower will release a 20% chance of Chain Lightning at a time
Credits to Weep for Damage Detection trigger

^ Has a flaw.
Try to remove towers,put a Blood Mage on map,change the condition to
  • (Unit-type of GDD_DamageSource) Equal to Blood Mage
,set chance to
  • (Random integer number between 1 and 100) Less than or equal to 100
and cast Flame Strike (or Banish) with Blood Mage among peasants.

ujelly?
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Can't you guess? x)
Obviously,all units damaged by spell will have themselves struck by a chain lightning, looks cool though.
attachment.php
 

Attachments

  • trololol.jpg
    trololol.jpg
    391.6 KB · Views: 217
Level 22
Joined
Sep 24, 2005
Messages
4,821
Garfield's point is that damage detection cannot distinguish between normal attack and ability induced damage. Even if you change the percentage of the chain lightning procuring, spells will still activate the chain lightning, and because we can't determine the damage type, so we really can't "avoid that action" for free. It's not a bug, rather it's the lack of warcraft 3's damage detection API.

Using attack orb effect buffs can solve this problem, but say good-bye to your orb effect abilities and items as these things will conflict with that.

I lol'd at the trolololo! :D
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I think you really didn't understand what Garfield just explained and proved to you. He did not do that on purpose, the trigger event unit is damaged doesn't know if the damage was caused by a spell or a normal attack. This is because blizzard didn't give us a function (API) that returns the damage type. I hope you get it now.

And we aren't provoking you.
 
Level 8
Joined
Mar 26, 2009
Messages
301
Garfield's point is that damage detection cannot distinguish between normal attack and ability induced damage. Even if you change the percentage of the chain lightning procuring, spells will still activate the chain lightning, and because we can't determine the damage type, so we really can't "avoid that action" for free. It's not a bug, rather it's the lack of warcraft 3's damage detection API.

Using attack orb effect buffs can solve this problem, but say good-bye to your orb effect abilities and items as these things will conflict with that.

I lol'd at the trolololo! :D
Are you sure they do conflict? I remember using orb of corruption as both item ability and physical attack detection system; it had no problems (as long as buffs are different)
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Are you sure they do conflict? I remember using orb of corruption as both item ability and physical attack detection system; it had no problems (as long as buffs are different)
The conflict would be on the damaging unit, there are some orb effects that can't work along other orb effects, specially for melee units. i.e. mask of death and frost orb, one of them won't work, you either would just life steal or just slow.
 
orb of lightning works fine for me, even if the unit auto-attacks...

Sh4de said:
Is there a way to Order a unit to use a custom ability and not the standard Chain Lightning?

yup, put the custom chain lightning ability, order the unit to use Orc Farseer - Chain Lightning, and it will cast the custom one...
 
Level 3
Joined
Nov 12, 2010
Messages
53
I think the trigger could be like this...

Events
Unit is attacked

Conditions
Attacking Unit has item Mjollnir

Actions
Create one dummy unit at attacked unit position
Add spell: Chain Lightning to last created unit
Order last created unit to cast Chain Lightning on attacked unit
Remove spell: Chain Lightning to last created unit
Add a 2 second generic timer to last created unit

This would work, right? I know it's a little simple, but you can upgrade it yourself
 
Level 5
Joined
Dec 22, 2007
Messages
103
yup, put the custom chain lightning ability, order the unit to use Orc Farseer - Chain Lightning, and it will cast the custom one...
I tried doing this, but the ability isn't casting. Heres the trigger i used,
  • Wraith Beam
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Unit-type of (Attacked unit) is A ground unit) Equal to True
      • (Unit-type of (Attacking unit)) Equal to Shadow Wyrm
    • Actions
      • Unit - Create 1 Wraith Beam Caster for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
      • Set WraithBeamCaster = (Last created unit)
      • Unit - Add Wraith Beam (Effect) to WraithBeamCaster
      • Unit - Add a 2.00 second Generic expiration timer to WraithBeamCaster
      • Unit - Order WraithBeamCaster to Orc Far seer - Chain Lightning (Attacked unit)
      • Unit - Remove Wraith Beam (Effect) from WraithBeamCaster
 
Status
Not open for further replies.
Top