[Spell] Chain Lightning Dummy position problem

Level 15
Joined
Sep 11, 2013
Messages
557
Greetings!

I have this tower that has a passive ability that casts chain lightning on the damage target with the help of a dummy that spawns in the middle of the damage target.

The problem is that, the dummy remain behind the moving damage target and the chain lightning effect remain also behind the damage target and is very unaesthetic.

Is there a way to stick the dummy together with the damage target at least for 2 seconds (until the lightning effect disappear)?

This spell must remain MUI because I have many towers and many dragons in my map.

***I don't want to spawn the dummy on the top of the tower.

I am in search for an easy solution. If there is no easy solution, i'll abandon this problem..

Here is a video with the problem.



  • Lightning Surge
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to Anti-Air Tower Ultimate
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Set VariableSet LightningSurgePoint = (Position of (Damage Target))
      • Unit - Create 1 Wisp Lightning Surge Dummy for (Owner of (Damage source)) at LightningSurgePoint facing (Position of (Damage Target))
      • Custom script: call RemoveLocation(udg_LightningSurgePoint)
      • Set VariableSet LightningSurgeDummy = (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to LightningSurgeDummy
      • Unit - Add Chain Lightning - Lightning Surge ZZZ Dummy to LightningSurgeDummy
      • Unit - Grant shared vision of (Damage Target) to (Owner of (Damage source))
      • Unit - Order LightningSurgeDummy to Orc Far Seer - Chain Lightning (Damage Target)
      • Unit - Deny shared vision of (Damage Target) to (Owner of (Damage source))
The help will be appreciated!
:peasant-bowing:
 
Something funny I just discovered is that if you in the object editor in the Lightning effects field, if you replace the first lightning effect with a non existing four char code (with Shift + Click), the first lightning of the spell is completly invisible:
1763822875207.png
 
Herly's suggestion seems perfect, I just want to add that...

I see that you're using a custom Dummy unit here, specific to this trigger. But the question is why? What about this Dummy unit needs to be unique from say a generic Dummy unit that can be used in the good majority of your triggers? Like I said before (I think it was in your thread), you should really only need 1 type of Dummy unit to handle EVERYTHING spell-casting related in your map.

One concern I have, related to the above paragraph, is that the Dummy is casting Chain Lightning later than it should. This would make the initial lightning effect more apparent since the target has more time to run away from it's origin point. It wouldn't necessarily solve the issue, but it's just something I noticed. I could be wrong though and maybe this Dummy is setup perfectly.

Another minor concern is that the 2.00 second expiration timer might not be long enough if the Chain Lightning can bounce enough times to outlast it.

A proper Dummy unit:
1. Copy and paste the Locust.
2. Set it's Model = None/Dummy.mdx, Shadow = None, Attacks Enabled = None, Movement Type = None, Speed Base = 0.
 
Last edited:
What was the reason not to have the dummy sit on top of the tower? That'd be my immediate way to fix that

Besides I think nowadays you can create such effect without the need for a dummy with Item Attack Lightning Bonus that can cast abilities with a % chance
I don't want to spawn the dummy on top of the tower because it is very unaesthetic in my subjective opinion.:peasant-smile:
Something funny I just discovered is that if you in the object editor in the Lightning effects field, if you replace the first lightning effect with a non existing four char code (with Shift + Click), the first lightning of the spell is completly invisible:
View attachment 558040
That's perfect! Thank you so much!

I hope that this will not crash the map tbo.:peasant-cheers-back:
I see that you're using a custom Dummy unit here, specific to this trigger. But the question is why? What about this Dummy unit needs to be unique from say a generic Dummy unit that can be used in the good majority of your triggers? Like I said before (I think it was in your thread), you should really only need 1 type of Dummy unit to handle EVERYTHING spell-casting related in your map.
Yes, I know very well.. It is a very bad habit that I have.. But I have an excuse here.. This dummy has a custom "height" that I don't need anymore because the first part of the spell is invisible now (AAAA)

One concern I have, related to the above paragraph, is that the Dummy is casting Chain Lightning later than it should. This would make the initial lightning effect more apparent since the target has more time to run away from it's origin point. It wouldn't necessarily solve the issue, but it's just something I noticed. I could be wrong though and maybe this Dummy is setup perfectly.

Another minor concern is that the 2.00 second expiration timer might not be long enough if the Chain Lightning can bounce enough times to outlast it.
All good :peasant-thumbs-up-cheers: I'll change to 7 seconds expiration timer.
 
Yes, I know very well.. It is a very bad habit that I have.. But I have an excuse here.. This dummy has a custom "height" that I don't need anymore because the first part of the spell is invisible now (AAAA)
I only pester you because I want what's best for your map ;)

There's usually Actions to handle any animation specific stuff you might need, like Height in this case:
  • Animation - Change (Last created unit) flying height to 100.00 at 0.00
I'm sure you understand this, but a clean Object Editor will save you a headache in the future and even help make your map load faster. This particular design helps avoid bugs/inconsistencies, since every trigger would use the same working Dummy unit. IE: Did you forget to give the Dummy unit a model that has Attachment points? One quick fix to that single Unit-type and all 100 "custom spell" triggers automatically benefit from it.

I often help people with their maps and what I find is a disorganized mess. I understand that time is limited, you just got off work and don't want to spend an hour organizing, but this "laziness" can actually cost more time than it saves in the long run.
 
Last edited:
I only pester you because I want what's best for your map ;)

There's usually Actions to handle any animation specific stuff you might need, like Height in this case:
  • Animation - Change (Last created unit) flying height to 100.00 at 0.00
I'm sure you understand this, but a clean Object Editor will save you a headache in the future and even help make your map load faster. This particular design helps avoid bugs/inconsistencies, since every trigger would use the same working Dummy unit. IE: Forget to give the Dummy unit a model that has attachment points? One quick fix to that single Unit-type and all 100 "custom spell" triggers automatically benefit from it.
Thank you so much! You really helped me a lot with this map/editor in all those years! :peasant-cheers-back:
 
Back
Top