• 🏆 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 3
Joined
May 23, 2009
Messages
30
I'm creating a level thats based inside a type of computer and i added one chain lightning effect from two regions that looked cool but for some reason the editor would not allow me to add another lightning effect, is there a way to add more of them?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
So, you say you've used this trigger:
  • Chain Lightning
  • Actions
    • -------- Lightning 1 --------
    • Set TempLoc[1] = Center of Region 1
    • Set TempLoc[2] = Center of Region 2
    • Lightning - Create a lightning effect Chain Lightning - Primary from (TempLoc[1]) to (TempLoc[2])
    • Custom script: call RemoveLocation(udg_TempLoc[1])
    • Custom script: call RemoveLocation(udg_TempLoc[2])
    • -------- Lightning 2 --------
    • Set TempLoc[1] = Center of Region 1
    • Set TempLoc[2] = Center of Region 3
    • Lightning - Create a lightning effect Chain Lightning - Primary from (TempLoc[1]) to (TempLoc[2])
    • Custom script: call RemoveLocation(udg_TempLoc[1])
    • Custom script: call RemoveLocation(udg_TempLoc[2])
But it will not show the second lightning?

If you use the same locations, the difference between 1 and multiple lightning effects isn't really clear, but I've tested it and the way I did it and it worked perfectly
 
Last edited:
Level 3
Joined
May 23, 2009
Messages
30
I had it that i could set multiple effects from say region 1 to 2 but when i then tried to create an effect from region 3 to 4 only one of these would work
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
What's with the complicated triggers?! I've found ways (for certain things) to make it alot smaller than other people do and it works fine... No offence apacolypse
(can you please say my name right, I'm sorry, but a lot of people say "Ap0calypse" wrong, it's annoying me... not that it has anything to do with you).

I guess you would do it like this:

  • Actions
    • Lightning - Create a lightning effect Chain Lightning - Primary from (Region 1 <gen>) to (region 2 <gen>)
    • Lightning - Create a lightning effect Chain Lightning - Primary from (region 1 <gen>) to (region 3 <gen>)
No offense, but that is a horrible, inefficient trigger that will cause lag and may desync the map, causing server splits.
If that is your idea of "a smaller trigger", go ahead, but you should learn about memory leaks first.
Things that Leak

My trigger actually isn't really complicated: it uses 1 variable, 2 normal actions and 4 custom scripts (which are basically the same).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
No xD that script was horrible I ment I find ways that dosent leak and it dosent have alot of that custom stuff in it thats all sorry for not spelling your name right :p

You need locations for lightning effects, if I'm correct :s
Tell me where I can locations that do not leak then :D

(no problem about the name, but it's really stupid if everyone writes your name wrong).
 
Level 3
Joined
May 23, 2009
Messages
30
just gonna bring this back on track abit, from the simple script that ap0calypse demonstrated was wrong, i noticed that it was still from region 1-3 and 1-2

I can have multiple effects coming from one point but the main thing is that if i do an effect from 1-2 and then another for 3-4 only one of those region effects will appear.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
just gonna bring this back on track abit, from the simple script that ap0calypse demonstrated was wrong, i noticed that it was still from region 1-3 and 1-2

I can have multiple effects coming from one point but the main thing is that if i do an effect from 1-2 and then another for 3-4 only one of those region effects will appear.


That was only a small part of my trigger actually.
I've tested it from 1-2, 1-3, 1-4, 2-3, 2-4 and 3-4 (all possible combinations with 4 locations).
I didn't encounter any problems with my trigger...
 
Level 3
Joined
May 23, 2009
Messages
30
Ok wierd just think my we hates me, thanks for the gem bwathke and ille try ap0calypse code and see if it will work properly, thanks for all the help:)
 
Status
Not open for further replies.
Top