Need help creating a move-able, "cosmetic" Lightning effect

Marsmallos

Member
Reaction score
17
Thread title might be a bit wierd, but I'll explain it :p

In my map there will be 10 players, and each player will control one hero. The players will fight different bosses and one of the bosses will at a certain interval (45 seconds) use an ability called Siphon Soul on a random hero.
The ability works like it is supposed to, but I also want to add some cosmetic lightning effects to the ability (effects that wont do anything except making the ability look cooler).
The effect will look like the boss is "draining" the target of Siphon Soul using some sort of lightning effect, and the draining will go on until the boss casts Siphon Soul on another hero (that is to say, the lightning effect will connect the boss and the hero for about 45 seconds) who then will have "draining" lightning effect instead.

Example
-Boss casts Siphon Soul on Hero 1
-Hero 1 and Boss are connected to each other with lightning effect for 45 seconds, they can move around and cast spells etc freely and the lightning effect connects them all the time.
-Boss casts Sihpon Soul on Hero 2
-The link between Hero 1 and Boss is broken
-Hero 2 and Boss are connected with the lightning instead

I tried making a picture in paint and hopefully it will help you understand what I mean (I am aware that I sometimes explains a bit fuzzy :p)


The black dot in the middle is the boss, the other black dot is the drained (Siphon Soul-ed) hero, the red line represents the lightning effect connecting the two together, and the blue arrow shows that the hero can move around and the lightning effect moving with him.

However I have NO idea how to do this, I tried triggering the lightning effect moving around using periodic (0.5 sec) events but it looked very choppy and my way of triggering involved creating and destroying a lot of points, and eventually made the game suddenly crash without any building-up lag or anything.

Anyone got any ideas on how to do this? :) +rep will be awarded
 

Charapanga

New Member
Reaction score
46
JASS:
Lightning - Create a Drain Life lightning effect from source (Position of (Triggering unit)) to target (Position of (Target unit of ability being cast))
Lightning - Destroy (Last created lightning effect)


And make it every 0.01 seconds (or something close to that)

there's a difference between Chain Lightning and Life Drain effects, might wana try it
 

Fluffball

Well-Known Member
Reaction score
35
.01 makes a LOT of lag, especially with a lot of other triggers running, .04 or .05 is for a slide, so
I'd say .1 should make it still look pretty good, remember to destroy those points!

Code:
Lightning Effect
   Events
      Every .10 seconds of game time
   Condtions
   Actions
      Create a drain life lightning effect from Boss and Target
      Destroy (Last Created Lightning Effect)

And in the trigger, just set Boss to the Boss and Target to the target.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top