• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Proper Use of Lightning

Status
Not open for further replies.
Ok so the quesion is like this:
I want to use the object lightning_effect[10] in UGI just like life drain;
But, as I tried to use it suddenly the game crushed teling there was an error, probably error caused by Leak.

How to properly use the Lightning_Effects without causing errors?

Thanks and sorry if I miss the spelling of some words.
 
Level 5
Joined
Jan 12, 2010
Messages
132
In order to use and create lightning effect you need 2 points.
  • Actions
    • Set - Point[1] = Position of (triggering unit)
    • Set - Point[2] =Target point of (ability being cast)
    • Lightning - Create lightning effect at (Point[1]) target (Point[2])
    • Set - Lightning_variable = (Last created lightning effect)
    • Custom script: call RemoveLocation(udg_Point[1])
    • Custom script: call RemoveLocation(udg_Point[2])
Hand written sry.You will need to use something like this.If you want your skill to be MUI is a hole different story.
 
In order to use and create lightning effect you need 2 points.
  • Actions
    • Set - Point[1] = Position of (triggering unit)
    • Set - Point[2] =Target point of (ability being cast)
    • Lightning - Create lightning effect at (Point[1]) target (Point[2])
    • Set - Lightning_variable = (Last created lightning effect)
    • Custom script: call RemoveLocation(udg_Point[1])
    • Custom script: call RemoveLocation(udg_Point[2])
Hand written sry.You will need to use something like this.If you want your skill to be MUI is a hole different story.
and then
  • Actions
    • Set - P1 = Position of (triggering unit)
    • Set - P2 =Target point of (ability being cast)
    • Lightning - Create lightning effect at (Point[1]) target (Point[2])
    • Set - Lightning_variable = (Last created lightning effect)
    • Custom script: call RemoveLocation(udg_Point[1])
    • Custom script: call RemoveLocation(udg_Point[2])
    • Commant: --- This is now trigger 2 ----
    • Lightning - Move lightning_variable to (Point[1]) target (Point[2])
  • Lightning - remove lightning_variable
The above cause game crush
 
Level 4
Joined
Oct 20, 2011
Messages
129
The second trigger doesn't set two new Point[1] and Point[2], but I think when they are 'null', these points will be known as 'Center of Playable Map Area'.
If your second trigger had set these point but it still crush, I think the error comes from your war3 data (maybe missing lightning type data(s))
 
The second trigger doesn't set two new Point[1] and Point[2], but I think when they are ':vw_death:null', these points will be known as 'Center of Playable Map Area'.
If your second trigger had set these point but it still crush, I think the error comes from your war3 data (maybe missing lightning type data(s))

Very weird. But its amazing that you say that if no Point was found the default point will be center of playable map area -> without leaving LEAK behind 0_0 are you sure about it? and the second thing is that I tried on Warcraft 3 of my friend 1 year ago using the same methode and it crushed, it must be something I'm doing wrong, also I forgot to mantion , The lightning effect was not removed when I ordered it to, instead, it randomly stayed and randomly removed, and after a few times caused the crush, what is the proper way to remove lightning effect[] ?
 
Status
Not open for further replies.
Top