• 🏆 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!

Triggering the chain lightning question

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
if we want make chain lightning ability effect with lightnings then how its look like?
because most of lightning spell what use lightning is instant but chain lightning ability effect look like a projectile with speed, so how its look like? something like create lets say 15 lightning and and last 5 is faded step by step before destroyed and work like multiple missile so each lightning point start after previous with a minimal delay??
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Well, you should use timed lightnings.
The lightning itself is instant (from unit to unit), but it has pauses between each target.

Could be done more easily by using 2 separate systems: one to handle the timed lightnings, the other to handle the spell (the pauses between targets, keeping track of how many units have been hit, calling the other system, checking if target unit hasn't been targeted before, that kind of stuff).
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Well, you should use timed lightnings.
The lightning itself is instant (from unit to unit), but it has pauses between each target.

Could be done more easily by using 2 separate systems: one to handle the timed lightnings, the other to handle the spell (the pauses between targets, keeping track of how many units have been hit, calling the other system, checking if target unit hasn't been targeted before, that kind of stuff).

what if u want do lightning with arc (horizontal parabola)? because between 2 unit never will be arc / parabola the lightning but also spaming units i guess the worst solution from lagg view
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
what if u want do lightning with arc (horizontal parabola)? because between 2 unit never will be arc / parabola the lightning but also spaming units i guess the worst solution from lagg view

why parabola? thatd just look silly. if you want an arc, than you just set x,y as the center of the arc than spawn units 10*, 15*, 20*, etc. along the edge to form the arc. its choppy but its the best representation. if you truly want a parabola, than just form the dummys along the graph
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
@deathismyfriend
Because reals are inaccurate, i recommend this value : 0.031250000

The inaccuracy is so small that I don't think those zeroes at the end really matter. It would be interesting to test.

0.03125 is used since it translates to exactly 32 fps per second (1/0.03125 = 32). It is often enough to make things look smooth, but to too often to cause performance issues.
 
Status
Not open for further replies.
Top