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
  • 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 The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs
  • Monovertex Monovertex:
    @The Helper I'm really not seeing the "Signature" link in the sidebar on that page. Here's a screenshot:
  • The Helper The Helper:
    I have reported it - I was wondering why nobody I have given sigs to over the last few years have used them
  • The Helper The Helper:
    Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.
  • The Helper The Helper:
    Here is a better place to manage this stuff https://www.thehelper.net/account/account-details which I think should be way more visible
  • The Helper The Helper:
    I am hoping that online user count drop is finally that TikTok bot banned
  • Ghan Ghan:
    I added the filter last night.
  • The Helper The Helper:
    They are still there

      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