Drain Mana Lightning with height

Zetrix91

TH.net Regular
Reaction score
2
so i wanna create a chain lightning effect with height and Drain Mana Lightning type..
ive got this so far

Trigger:
  • Custom script: call AddLightningEx("CLPB", true, GetLocationX(udg_Light_Start_Point), GetLocationY(udg_Light_Start_Point), 290, GetLocationX(udg_Light_End_Point), GetLocationY(udg_Light_End_Point), 30)


i know that CLPB stands for Chain Lightning Primary Bounce or something like that.. what is the code for Drain Mana "DM"?

and i get an error saying "Expected a name" any pointers why?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, "DRAM" is the Drain Mana lightning...

And I don't get an error with that code...
 

Zetrix91

TH.net Regular
Reaction score
2
mayby it has something to do with my similar trigger.

Trigger:
  • Custom script: call AddLightningEx("CLPB", true, GetLocationX(udg_Dark_Start_Point), GetLocationY(udg_Dark_Start_Point), 290, GetLocationX(udg_Dark_End_Point), GetLocationY(udg_Dark_End_Point), 30)


and this one doesnt get an error
 

Zetrix91

TH.net Regular
Reaction score
2
sorry for the 2x post but i really need help here, can someone explain to me why out of 2 similar trigger only one of them get an error... explain how the custom script lightning works plz.... +rep !! <3 ;*
 

Zetrix91

TH.net Regular
Reaction score
2
move and destroy

so if i have created a lightning without the error with the following action:
Trigger:
  • Custom script: call AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_Frost_Ward_Ward_Point), GetLocationY(udg_Frost_Ward_Ward_Point), 90, GetLocationX(udg_Frost_Ward_Target_Point), GetLocationY(udg_Frost_Ward_Target_Point), 90)
    • Set Frost_Ward_Lightning = (Last created lightning effect)


how do i move it and destroy it afterwards? ty in advance
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, where do you want to move it ? :S
And, when do you want to destroy it ?

You need to provide more information, otherwise it's very hard to help...

But, this is just an example of how to move lightning:
Trigger:
  • Move Lightning
    • Events
    • Conditions
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Set TempPoint2 = ((Center of (Playable map area)) offset by 100.00 towards (Random angle) degrees)
      • Lightning - Move (Last created lightning effect) to source TempPoint and target TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint)
 

LightChaosma

New Member
Reaction score
60
just a sugestion... knowing that lightbning can be complicated... why not use dummies and finger of death?

u can set height, distance etc

create a dummy for you, a dummy for neutral ohstile, set the heights (you can even let the lightning move upwards if you like), the duration in the object editor ad voila
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Trigger:
  • Custom script: call AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_Frost_Ward_Ward_Point), GetLocationY(udg_Frost_Ward_Ward_Point), 90, GetLocationX(udg_Frost_Ward_Target_Point), GetLocationY(udg_Frost_Ward_Target_Point), 90)
    • Set Frost_Ward_Lightning = (Last created lightning effect)


This won't work because you're not using the bj_lastCreatedLightning.

When you use the BJ, the GUI action 'Create lightning', it triggers like this:
JASS:
function AddLightningLoc takes string codeName, location where1, location where2 returns lightning
    set bj_lastCreatedLightning = AddLightningEx(codeName, true, GetLocationX(where1), GetLocationY(where1), GetLocationZ(where1), GetLocationX(where2), GetLocationY(where2), GetLocationZ(where2))
    return bj_lastCreatedLightning
endfunction

(Jasscraft)

You have two options now.
Or you use
(This will work as jass works.)
JASS:
local effect e = AddLightning(etc...)
call DestroyEffect(e)
set e=null


Or you use

(This will work with the GUI-ed.)
Trigger:
  • Actions -
    • Custom script: set bj_lastCreatedLightning = AddLightning(etc...)
    • Lightning - DestroyLightning(Last created lightning effect)
 

Zetrix91

TH.net Regular
Reaction score
2
one more issue if u have the patience =)

how do i mix "Integer A" in with the variables in the Custom Script ? :p
example
Trigger:
  • For each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
      • Custom script: set bj_lastCreatedLightning = AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_Frost_Ward_Ward_Point[IntegerA here?]), GetLocationY(udg_Frost_Ward_Ward_Point[IntegerA here?]), 140, GetLocationX(udg_Frost_Ward_Target_Point[IntegerA here?]), GetLocationY(udg_Frost_Ward_Target_Point[IntegerA here?]), 60)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Trigger:
  • Custom script: set bj_lastCreatedLightning = AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_Frost_Ward_Ward_Point[IntegerA here?]), GetLocationY(udg_Frost_Ward_Ward_Point[IntegerA here?]), 140, GetLocationX(udg_Frost_Ward_Target_Point[IntegerA here?]), GetLocationY(udg_Frost_Ward_Target_Point[IntegerA here?]), 60)


Becomes:
Trigger:
  • Custom script: set bj_lastCreatedLightning = AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_Frost_Ward_Ward_Point[bj_forLoopAIndex]), GetLocationY(udg_Frost_Ward_Ward_Point[bj_forLoopAIndex), 140, GetLocationX(udg_Frost_Ward_Target_Point[bj_forLoopAIndex]), GetLocationY(udg_Frost_Ward_Target_Point[bj_forLoopAIndex]), 60)


;)
 

Zetrix91

TH.net Regular
Reaction score
2
okay that worked fine =) except i had to shorten the variable names because the custom script line was too long (any way to not do that?)

but for the next problem :p

i want one of the lightnings to be an Array i choose, not Integer A so i tried this
Trigger:
  • Custom script: set bj_lastCreatedLightning = AddLightningEx(&quot;DRAM&quot;, true, GetLocationX(udg_FWWPoint[6]), GetLocationY(udg_FWWPoint[6]), 140, GetLocationX(udg_FWWPoint[1), GetLocationY(udg_FWWPoint[1]), 60)

but got an error saying "expected expression"
how do i set the array myself?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You forgot an "]" here:
Code:
Custom script: set bj_lastCreatedLightning = AddLightningEx("DRAM", true, GetLocationX(udg_FWWPoint[6]), GetLocationY(udg_FWWPoint[6]), 140, GetLocationX(udg_FWWPoint[1[COLOR="Red"]][/COLOR]), GetLocationY(udg_FWWPoint[1]), 60)

;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top