Storing a lightning effect

Grymlax

Probably not around
Reaction score
138
Hi again.

A couple of months ago I asked how to set the height of a lightning effect and i got some help so that i would be able to do it with Gui. This was more out of curiosity so I only looked if it worked not if it worked as I intended. The problem I am having is that I don’t know how to store the lightning I’m creating and therefore I can’t alter it of remove it.

Code:
Simplified trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
    Actions
        Custom script:   local unit cast = GetTriggerUnit()
        Custom script:   local unit target = GetSpellTargetUnit()
        Custom script:   local real x1 = GetUnitX(cast)
        Custom script:   local real y1 = GetUnitY(cast)
        Custom script:   local real z1 = 50
        Custom script:   local real x2 = GetUnitX(target)
        Custom script:   local real y2 = GetUnitY(target)
        Custom script:   local real z2 = 500
        Custom script:   call AddLightningEx("AFOD", true, x1, y1, z1, x2, y2, z2)
        [COLOR="Blue"]Set Lightning = (Last created lightning effect)[/COLOR][COLOR="RoyalBlue"] <----- (this part isn't working)[/COLOR]

It would be great if someone just could just tell me how i would do to store that lightning.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Yep, because (Last Created Lightning) is BJ, and only BJ returns a BJ.
 
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