• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Chain Lightning Effect

Status
Not open for further replies.
Level 37
Joined
Jul 22, 2015
Messages
3,485
Hello everyone, this is Lightning Tower.
f4kahk.png


*A simultaneous monotone "Hello Lightning Tower" fills the room*

Lightning Tower has a passive ability that gives him a percent change to cast chain lightning everytime he attacks. Unfortunately, this is what it looks like...
2rpctg5.png


Is there anyway to fix this gap highlighted by the red circle?



These are the triggers behind the passive ability in correlation with Weep's Damage Detect System. I'm aware with the way its setup, it will happen everytime. I haven't came across adding the percent chance yet because I'm testing to make sure everything works.

  • Chain Lightning Init
    • Events
      • Game - GDDSystem_Event becomes Equal to 0.00
    • Conditions
      • (Level of Chain Lightning (Fake Passive) for GDDSystem_DamageSource) Equal to 1
    • Actions
      • Set ChainLightning_AttackerLoc = (Position of GDDSystem_DamageSource)
      • Unit - Create 1 Chain Lightning Dummy for (Owner of GDDSystem_DamageSource) at ChainLightning_AttackerLoc facing Default building facing degrees
      • Set ChainLightning_DummyUnit = (Last created unit)
      • Unit - Turn collision for ChainLightning_DummyUnit Off
      • Unit - Add Crow Form to ChainLightning_DummyUnit
      • Unit - Remove Crow Form from ChainLightning_DummyUnit
      • Animation - Change ChainLightning_DummyUnit flying height to 250.00 at 0.00
      • Unit - Order ChainLightning_DummyUnit to Orc Far Seer - Chain Lightning DDSystem_DamagedUnit
      • Unit - Add a 1.00 second Generic expiration timer to ChainLightning_DummyUnit
      • Custom script: call RemoveLocation (udg_ChainLightning_AttackerLoc)
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
either make the dummy a flying unit or create your system that creates and manages lightning attacks.
At the moment it seems the dummy unit is moved when created (due to pathing).

Another option may be to create the unit, do stuff with it (change flying height, etc.) and then move it again to the AttackerLoc.

Edit: Also make sure the dummy actually has "Art - Projectile Launch X/Y/Z" (or something like that) set to 0, as that offsets the projectile as well.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
either make the dummy a flying unit or create your system that creates and manages lightning attacks.
At the moment it seems the dummy unit is moved when created (due to pathing).

Another option may be to create the unit, do stuff with it (change flying height, etc.) and then move it again to the AttackerLoc.

Edit: Also make sure the dummy actually has "Art - Projectile Launch X/Y/Z" (or something like that) set to 0, as that offsets the projectile as well.

Lightning Tower is now on the road to recovery. Thank's Nichilus!

53k8p2.png



Setting Movement Type to Fly (or base the dummy unit from a default flying unit) and editing Project Launch does the trick.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Btw, you wouldn't even need triggers in that case. If you use the lightning orb, it allows you defining a proc chance and a spell to use on proc. Just set it to chain lightning.

It doesn't bounce like Chain Lightning. Also, I think the Art - Lightning Effect under that spell is redundant.

Other than that, nice idea to make a help request a bit funnier to read. :p

Haha :p I'm always posting questions/requests, so I thought I would do something different for once.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
You can modify the chain lightning to only hit one target. It has a data field for that.

I want it to hit multiple targets xP

Alternatively: You don't need triggers to use chain lightning on attack. You could just use bouncing attacks or the "Item Attack Black Arrow Bonus" ability; which will cast a single target spell on attack.

Using Black Arrow Bonus ability will override the unit's attack animation (which is a Lightning Effect for the Lightning Tower).
 
Still, you can use "Weapon type: Missle (bounce)" + "Maximum number of targets >1" and the Lightning Attacks ability. Will make attacks that look exactly like chain lightning. "Damage Loss Factor" works exactly like "Damage Reduction per target" on top of that, so the effect will be almost exactly like chain lightning on attack.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Sorry about late response guys!

Ah, I see your problem now... but you can always use the lightning effect on the orb missile aswell.

Lightning Effect is a pointless data field for orb missle :( it doesn't actually do anything.

Still, you can use "Weapon type: Missle (bounce)" + "Maximum number of targets >1" and the Lightning Attacks ability. Will make attacks that look exactly like chain lightning. "Damage Loss Factor" works exactly like "Damage Reduction per target" on top of that, so the effect will be almost exactly like chain lightning on attack.

Just tried this method, but the bounce doesn't work o_O I made Attack Weapon Type - Missle (Bounce) and Maximum Number of Targets - 5, but the chain bounce isn't happening. However, if this method were to work, it would no longer be a % chance like I want it to be.
 
Status
Not open for further replies.
Top