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

Lightning Effects.

Status
Not open for further replies.
Level 4
Joined
Apr 15, 2016
Messages
61
How to create them ? Well not create, but how to manipulate them ? I want to make a Lightning Effect between one unit (which casts a skil) and EVERY other unit near (not in chain. Linked between the enemies and the caster DIRECTLY). After 5 seconds the Lightning would be destroyed. I don't get how can I do so.

Also, Is it possible to make Lightning Effects visible only to allies ? Or at least not visible one unit is in fog for the enemies ?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
This is the tutorial I started with when I was first interested in Lightning Effects. In terms of data structure, you will need to individually index each lightning to a specific instance. Hashtables would be the easiest way to do this.

Also, Is it possible to make Lightning Effects visible only to allies ? Or at least not visible one unit is in fog for the enemies ?
If you want it only visible to certain players, you will need to play around with the GetLocalPlayer() native. It's a pretty powerful native, but you must be extremely careful for it can cause desyncs in multiplayer. Again, here's another great tutorial by PurgeandFire on how to use it properly.
 
Status
Not open for further replies.
Top