Lightning height n stuff, need help

minikrampan

Ultra Cool Member
Reaction score
28
Im playing around with lightning effects in this spell and i need a code similar to this
Trigger:
  • Lightning - Move Electric[(Integer A)]Check visibility=True to (0.00,0.00,0.00) (0.00,0.00,0.00)

this is from WEU and i rather not use it. So could anyone tell me to custom script code for this action don't need the boolean thingy only

Trigger:
  • Lightning - Move Electric[(Integer A)] to (0.00,0.00,0.00) (0.00,0.00,0.00)



Edit: Btw i can't use the normal move lightning because i need the Z height too.
Thanks
 

minikrampan

Ultra Cool Member
Reaction score
28
okay thanks,

Trigger:
  • Custom script: call MoveLightningEx(Electric[bj_forLoopAIndex], true, GetLocationX(udg_casting_point), GetLocationY(udg_casting_point), 650, GetLocationX(udg_temp_point2), GetLocationY(udg_temp_point2), 0)


Would this work?
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Hm. Could be many things.
JASS:
call MoveLightningEx(udg_yourlightning[GetForLoopIndexA], true, startx, starty, startz, endx, endy, endz)

If it doesn't work, make sure the area which you create it on is visible, and did you create the lightning bolts too?

There's been debated if lightning effects leak if you don't null them, but I'll conclude with that you should be destroying them, but not nulling them. (They're pseudo-handles, like players)
 

minikrampan

Ultra Cool Member
Reaction score
28
I guess the best thing is to post the triggers.

Trigger:
  • Spell3 cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spell
    • Actions
      • -------- Setup --------
      • Set casting_unit = (Casting unit)
      • Set casting_point = (Position of casting_unit)
      • Set ability = (Ability being cast)
      • Set abilitylevel_int = (Level of ability for casting_unit)
      • Set abilitylevel_real = (Real(abilitylevel_int))
      • Set target_point = (Target point of ability being cast)
      • Set temp_point = target_point
      • -------- maximum range --------
      • Set real1[1] = 1500.00
      • -------- Visual effect --------
      • Set specialeffect = Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
      • -------- Lightning --------
      • Set LightType = Finger of Death
      • Set LightStartPoint = casting_point
      • Set LightEndPoint = target_point
      • Set LightStartZ = 650.00
      • Set LightEndZ = -50.00
      • -------- dummy --------
      • Unit - Create 1 dummy for (Owner of casting_unit) at target_point facing Default building facing (270.0) degrees
      • Set dummy = (Last created unit)
      • -------- stuff --------
      • Unit - Add Crow Form to casting_unit
      • Animation - Change casting_unit flying height to 600.00 at 600.00
      • Animation - Play casting_unit's spell animation
      • Wait 0.50 seconds
      • Animation - Change casting_unit's animation speed to 0.00% of its original speed
      • For each (Integer A) from 1 to abilitylevel_int, do (Actions)
        • Loop - Actions
          • Custom script: call Light3D()
          • Set Electric[(Integer A)] = LightCustom
      • Custom script: call RemoveLocation(udg_LightStartPoint)
      • Custom script: call RemoveLocation(udg_LightEndPoint)
      • Trigger - Turn on Spell3 periodic <gen>
      • Trigger - Turn on Spell3 target <gen>
      • Wait 10.00 seconds
      • -------- End --------
      • For each (Integer A) from 1 to abilitylevel_int, do (Actions)
        • Loop - Actions
          • Lightning - Destroy Electric[(Integer A)]
      • Trigger - Turn off Spell3 periodic <gen>
      • Trigger - Turn off Spell3 target <gen>
      • Animation - Play casting_unit's stand animation
      • Animation - Change casting_unit's animation speed to 100.00% of its original speed
      • Animation - Change casting_unit flying height to 0.00 at 600.00
      • Unit - Remove Crow Form from casting_unit


Trigger:
  • Spell3 periodic
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set temp_point2 = (Position of dummy)
      • Set temp_point3 = (temp_point2 offset by 50.00 towards (Angle from temp_point2 to temp_point) degrees)
      • Unit - Move dummy instantly to temp_point3
      • Unit - Move casting_unit instantly to casting_point, facing temp_point2
      • For each (Integer A) from 1 to abilitylevel_int, do (Actions)
        • Loop - Actions
          • Custom script: call MoveLightningEx(Electric[bj_forLoopAIndex], true, GetLocationX(udg_casting_point), GetLocationY(udg_casting_point), 650, GetLocationX(udg_temp_point2), GetLocationY(udg_temp_point2), 0)
      • Special Effect - Create a special effect at temp_point2 using specialeffect
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_temp_point2)
      • Custom script: call RemoveLocation(udg_temp_point3)


Trigger:
  • Spell3 target
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit - Move casting_unit instantly to casting_point
      • Custom script: call RemoveLocation(udg_temp_point)
      • Set temp_point = (Target point of issued order)


Edit: dunno if its needed but heres a function im using too,
Code:
function Light3D takes nothing returns nothing
   local real X1 = GetLocationX(udg_LightStartPoint)
   local real X2 = GetLocationX(udg_LightEndPoint)
   local real Y1 = GetLocationY(udg_LightStartPoint)
   local real Y2 = GetLocationY(udg_LightEndPoint)
   local real Z1 = udg_LightStartZ
   local real Z2 = udg_LightEndZ
   set udg_LightCustom = AddLightningEx( udg_LightType, true, X1, Y1, Z1, X2, Y2, Z2)
endfunction

here it is.

The problem is that i get an error message when im about to test the map
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
You shouldn't make lightning effects go below ground, it causes crashes.
What kind of an error is it?
 

minikrampan

Ultra Cool Member
Reaction score
28
lol, its just silly me, forgot the udg before i change the lightning thingy. all that is left is get the casting unit to stay in the correct point, he keeps moving around even though he should be moved.

and thanks for your help btw
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top