#### n1mr0d

##### Member
Ok so here is this 2 command, as custom script, they have parameters like :
AddLightningEx(some lightning, true, x, y, z,x1,y1,z1)
MoveLightningEx(the lastcreated lightning, true,x,y,z,x2,y2,z2)
My question is what Z supposed to mean ?
As i know x and y are parameters that define a specific point. But what is Z?

From what I know from math class it's hight. You know if y is north/south and x is west/east then z is up/down.

and i'm creating 1 lightning, with AddLightningEx, but still i can't move with MoveLIghtningEx, can somebody explain me why ?

How are you using the MoveLightningEx function? Post your trigger(s).

How are you using the MoveLightningEx function? Post your trigger(s).

Here it is :
Trigger:
• Magical Nest
• Events
• Unit - A unit Starts the effect of an ability
• Conditions
• (Ability being cast) Equal to Magical Nest
• Actions
• Set TempKey = (Key (Target unit of ability being cast))
• Set Magical_Nest_Caster_Unit = (Triggering unit)
• Set Magical_Nest_Caster_Point = (Position of Magical_Nest_Caster_Unit)
• Set Magical_Nest_Unit = (Target unit of ability being cast)
• Set TempPoint1 = (Position of Magical_Nest_Unit)
• Unit - Pause Magical_Nest_Caster_Unit
• Unit - Pause Magical_Nest_Unit
• Special Effect - Create a special effect attached to the chest of Magical_Nest_Unit using Abilities\Spells\Human\AerialShackles\AerialShacklesTarget.mdl
• Set Magical_Nest_Special_Effect = (Last created special effect)
• Hashtable - Save Handle OfMagical_Nest_Special_Effect as 1 of TempKey in Magical_Hashtable
• Set Magical_Nest_Range_Beetween = (Distance between Magical_Nest_Caster_Point and TempPoint1)
• Hashtable - Save (2.00 x Magical_Nest_Range_Beetween) as 2 of TempKey in Magical_Hashtable
• Set Magical_Nest_Angle = (Angle from Magical_Nest_Caster_Point to TempPoint1)
• Hashtable - Save Magical_Nest_Angle as 3 of TempKey in Magical_Hashtable
• Set X1 = (X of Magical_Nest_Caster_Point)
• Set Y1 = (Y of Magical_Nest_Caster_Point)
• Set Z1 = (Current flying height of Magical_Nest_Caster_Unit)
• Set X2 = (X of TempPoint1)
• Set Y2 = (Y of TempPoint1)
• Set Z2 = (Current flying height of Magical_Nest_Unit)
• Set Magical_Nest_Lightning = (Last created lightning effect)
• Hashtable - Save Handle OfMagical_Nest_Lightning as 4 of TempKey in Magical_Hashtable
• Set Magical_Nest_Speed = -1800.00
• Hashtable - Save Magical_Nest_Speed as 5 of TempKey in Magical_Hashtable
• Hashtable - Save Handle OfMagical_Nest_Caster_Unit as 6 of TempKey in Magical_Hashtable
• Set Magical_Nest_Level = (Level of Magical Nest for Magical_Nest_Caster_Unit)
• Hashtable - Save Magical_Nest_Level as 7 of TempKey in Magical_Hashtable
• Set Magical_Nest_UnitHeight = (Current flying height of Magical_Nest_Unit)
• Hashtable - Save Magical_Nest_UnitHeight as 8 of TempKey in Magical_Hashtable
• Hashtable - Save (2.00 x Magical_Nest_Range_Beetween) as 9 of TempKey in Magical_Hashtable
• Unit - Add Crow Form to Magical_Nest_Unit
• Unit - Remove Crow Form from Magical_Nest_Unit
• Unit Group - Add Magical_Nest_Unit to Magical_Nest_UnitGroup
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Magical Nest Effect &lt;gen&gt; is on) Equal to False
• Then - Actions
• Trigger - Turn on Magical Nest Effect &lt;gen&gt;
• Else - Actions
• Custom script: call RemoveLocation(udg_Magical_Nest_Caster_Point)
• Custom script: call RemoveLocation(udg_TempPoint1)

Trigger:
• Magical Nest Effect
• Events
• Time - Every 0.03 seconds of game time
• Conditions
• Actions
• Unit Group - Pick every unit in Magical_Nest_UnitGroup and do (Actions)
• Loop - Actions
• Set Magical_Nest_Unit = (Picked unit)
• Unit - Turn collision for Magical_Nest_Unit Off
• Set TempKey = (Key (Picked unit))
• Set Magical_Nest_Special_Effect = (Load 1 of TempKey in Magical_Hashtable)
• Set Magical_Nest_Range_Beetween = (Load 2 of TempKey from Magical_Hashtable)
• Set Magical_Nest_Angle = (Load 3 of TempKey from Magical_Hashtable)
• Set Magical_Nest_Lightning = (Load 4 of TempKey in Magical_Hashtable)
• Set Magical_Nest_Speed = (Load 5 of TempKey from Magical_Hashtable)
• Set Magical_Nest_Caster_Unit = (Load 6 of TempKey in Magical_Hashtable)
• Set Magical_Nest_Caster_Point = (Position of Magical_Nest_Caster_Unit)
• Set Magical_Nest_Level = (Load 7 of TempKey from Magical_Hashtable)
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Magical_Nest_Range_Beetween Greater than 0.00
• Then - Actions
• Unit - Make Magical_Nest_Caster_Unit face Magical_Nest_Unit over 0.01 seconds
• Set TempPoint1 = (Position of Magical_Nest_Unit)
• Set TempPoint2 = (TempPoint1 offset by (Magical_Nest_Speed x 0.03) towards Magical_Nest_Angle degrees)
• Unit - Move Magical_Nest_Unit instantly to TempPoint2
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Magical_Nest_Range_Beetween Less than or equal to ((Load 9 of TempKey from Magical_Hashtable) / 2.00)
• Then - Actions
• Set Magical_Nest_UnitHeight = (Magical_Nest_UnitHeight - 25.00)
• Animation - Change Magical_Nest_Unit flying height to Magical_Nest_UnitHeight at 1000000000.00
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Magical_Nest_UnitHeight Less than or equal to 0.00
• Then - Actions
• Unit - Create 1 Special Effect for (Owner of Magical_Nest_Caster_Unit) at TempPoint1 facing Default building facing degrees
• Unit - Kill (Last created unit)
• Else - Actions
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Magical_Nest_Range_Beetween Greater than ((Load 9 of TempKey from Magical_Hashtable) / 2.00)
• Then - Actions
• Set Magical_Nest_UnitHeight = (Magical_Nest_UnitHeight + 20.00)
• Animation - Change Magical_Nest_Unit flying height to Magical_Nest_UnitHeight at 1000000000.00
• Else - Actions
• Set X1 = (X of Magical_Nest_Caster_Point)
• Set Y1 = (Y of Magical_Nest_Caster_Point)
• Set Z1 = (Current flying height of Magical_Nest_Caster_Unit)
• Set X2 = (X of TempPoint2)
• Set Y2 = (Y of TempPoint2)
• Set Z2 = (Current flying height of Magical_Nest_Unit)
• Custom script: call MoveLightningEx(udg_Magical_Nest_Lightning,true,udg_X1,udg_Y1,udg_Z1,udg_X2,udg_Y2,udg_Z2)
• Hashtable - Save (Magical_Nest_Range_Beetween + (Magical_Nest_Speed x 0.03)) as 2 of TempKey in Magical_Hashtable
• Custom script: call RemoveLocation(udg_TempPoint1)
• Custom script: call RemoveLocation(udg_TempPoint2)
• Else - Actions
• Set TempPoint1 = (Position of Magical_Nest_Unit)
• Special Effect - Destroy Magical_Nest_Special_Effect
• Unit - Unpause Magical_Nest_Caster_Unit
• Unit - Unpause Magical_Nest_Unit
• Lightning - Destroy Magical_Nest_Lightning
• Custom script: set bj_wantDestroyGroup = true
• Destructible - Pick every destructible within 250.00 of TempPoint1 and do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Current life of (Picked destructible)) Greater than or equal to 0.00
• Then - Actions
• Unit - Order Harvest to Harvest (Picked destructible)
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Current order of Harvest) Equal to (Order(harvest))
• Then - Actions
• Destructible - Kill (Picked destructible)
• Else - Actions
• Unit - Order Harvest to Stop
• Else - Actions
• Unit Group - Pick every unit in (Units within 250.00 of TempPoint1) and do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Picked unit) is A structure) Equal to False
• ((Picked unit) belongs to an enemy of (Owner of Magical_Nest_Caster_Unit)) Equal to True
• ((Picked unit) is alive) Equal to True
• Magical_Nest_Unit Not equal to (Picked unit)
• Then - Actions
• Set TempPoint2 = (Position of (Picked unit))
• Unit - Create 1 Damage And Stun for (Owner of Magical_Nest_Caster_Unit) at TempPoint2 facing Default building facing degrees
• Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
• Unit - Set level of Magical Nest Stun for (Last created unit) to Magical_Nest_Level
• Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
• Custom script: call RemoveLocation(udg_TempPoint2)
• Else - Actions
• Special Effect - Create a special effect at TempPoint1 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
• Unit Group - Remove Magical_Nest_Unit from Magical_Nest_UnitGroup
• Unit - Turn collision for Magical_Nest_Unit On
• Hashtable - Clear all child hashtables of child TempKey in Magical_Hashtable
• Animation - Reset Magical_Nest_Unit&#039;s animation
• Custom script: call RemoveLocation(udg_TempPoint1)
• Custom script: call RemoveLocation(udg_Magical_Nest_Caster_Point)
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Magical_Nest_UnitGroup is empty) Equal to True
• Then - Actions
• Trigger - Turn off Magical Nest Effect &lt;gen&gt;
• Else - Actions

To be easier to see where i use Add/MoveLightningEx here's this picture.

Would you by any chance be able to copy this into a new map and upload that? Staring at long static code hurts my eyes >.<

EDIT: Looking at the fringes of your code, I'm assuming that the problem lies in the fact that you're storing variables into your hashtable, then wiping the variables.

This causes the variables to lose their values, so whatever was stored in the hashtable is also lost. Hence, you've also cleared the values stored in the hashtable.

I can help with the model of DoTa, anyway i don't know if it's changed or not. I found 2 models in my map, so i'm gonna add them.

#### Attachments

• Walls.zip
1.7 KB · Views: 208
thx

Would you by any chance be able to copy this into a new map and upload that? Staring at long static code hurts my eyes >.<

EDIT: Looking at the fringes of your code, I'm assuming that the problem lies in the fact that you're storing variables into your hashtable, then wiping the variables.

This causes the variables to lose their values, so whatever was stored in the hashtable is also lost. Hence, you've also cleared the values stored in the hashtable.
maybe , but as what i observed it's working with Move Lightning and Create Lightning (in gui version), i'm gonna try what u said.

EDIT : Still not working... still the Lightning is not moving , and by the way i also can't destroy the lightning.

Instead of double post use EDIT button , anyway you can DP only if 24H are passed and there is no answer in your thread.

General chit-chat
Help Users
• No one is chatting at the moment.
• The Helper:
Added new Crab Bisque Soup recipe - which is badass by the way - Crab Bisque - https://www.thehelper.net/threads/soup-crab-bisque.196085/
• The Helper:
I feel like we need to all meet up somewhere sometime. Maybe like in Vegas
+2
• The Helper:
Would love to go to Vegas I have never been and it would be an adventure! Who is in?
• The Helper:
at least the full on bot attack has stopped it was getting ridiculous there for a while and we use cloudflare and everything
• jonas:
I'm sure my wife would not be happy if I went to Vegas, but don't let that stop you guys - would be hard for me to attend anyways
+1
• jonas:
Do you know why the bot attack stopped?
• The Helper:
maybe they finally got everything lol
• Ghan:
There's lots of good food in Vegas.
• Ghan:
Everything tends to be pretty expensive though so bring your wallet.
+1
• The Helper:
I have to wait longer if I am going for food because my teeth are still messed up from the work and I still cannot eat right. Going to be a couple more months before that gets better
+1
• The Helper:
I would immediately hitting the dispensary though
+1
• Varine:
My Xbox account got hijacked, and apparently I have a different one from like 10 years ago that Microsoft keeps telling me is the right one
• Varine:
Like NO, I mean for some reason that one is attached to my email, but it's not the right one
• Varine:
I have a different one, and that one has my credit card attached to it and I would like that credit card to not be attached to it if I can't get it back
• Varine:
Anyway Microsoft is not very helpful with this, they just keep telling me to fill out the Account Recovery form, but that just redirects me to the other account
• The Helper:
They should not allow you to put a credit card on a account that does not have human customer service you can call
• Varine:
That's the only thing that got hijacked at least. I don't totally know how these integrate together, but it seems like I should be able to do this via the gamertag. Like my email is still mine, but they changed the email to that account I'm guessing.
+1
• Blackveiled:
I went to Vegas a few weeks ago to visit my mom. I had never been either, lol! But I'm working in Salt Lake City at the moment so it's not a far trip.
+2
• The Helper:
I have never been to Vegas and it is on the bucket list so...
+1
• tom_mai78101:
+1
• Ghan:
I've heard Shapez 2 is good.
+1
• Ghan:
Also Satisfactory 1.0 released on the 10th and that has been excellent as well.
+1
• The Helper:
Happy Saturday! Hope everyone has a fantastic day!
+1
• tom_mai78101:
My mistake is moving from Shapez (beaten the game) to Shapez 2.

### Members online

No members online now.