- Joined
- Apr 19, 2011
- Messages
- 447
Hi.
I need you to help me find out why a custom script in my spell is constantly crashing WE whenever I try to fix it.
Here is the trigger. The conflictive custom script is surrounded with XXXXXXXXXXX.
Note: I'm still a bit noob with custom scripts and spell-making, so please don't kill me if you see some incoherent or incorrect things. XD
Well, I need to change that custom script with this one:
Someone knows what could be the reason? I don't even know if this trigger works in-game, because I can't finish it without crashing WE.
If you nedd to see the main trigger where the spell starts, or the setup trigger where the used variables are defined, just ask for it, I'll post it.
Regards
I need you to help me find out why a custom script in my spell is constantly crashing WE whenever I try to fix it.
Here is the trigger. The conflictive custom script is surrounded with XXXXXXXXXXX.
Note: I'm still a bit noob with custom scripts and spell-making, so please don't kill me if you see some incoherent or incorrect things. XD
-
Lightning Vortex LOOP
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Lightning_Vortex_Casters and do (Actions)
-
Loop - Actions
- Set Key = (Key (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 7 of Key from Lightning_Vortex) Lesser than LV_T
-
Then - Actions
- -------- Moving the central dummy with the caster --------
- Set TempUnit = (Load 3 of Key in Lightning_Vortex)
- Custom script: call SetUnitX(udg_TempUnit, GetUnitX(GetEnumUnit()))
- Custom script: call SetUnitY(udg_TempUnit, GetUnitY(GetEnumUnit()))
- -------- Moving the first secondary DUMMY --------
- Set TempReal = (Load 2 of Key from Lightning_Vortex)
- Set TempUnit = (Load 4 of Key in Lightning_Vortex)
- Custom script: call SetUnitX(udg_TempUnit, GetUnitX(GetEnumUnit()) + udg_LV_L * Cos(udg_TempReal * bj_DEGTORAD))
- Custom script: call SetUnitY(udg_TempUnit, GetUnitY(GetEnumUnit()) + udg_LV_L * Sin(udg_TempReal * bj_DEGTORAD))
- Set TempReal = (((LV_H x (Power((Sin(((Load 6 of Key from Lightning_Vortex) / LV_Sp[((Level of Lightning Vortex for (Picked unit)) - 1)]))), 2.00))) x (Real(LV_Osc[((Level of Lightning Vortex for (Picked unit)) - 1)]))) x (100.00 x (1.00 - (Real(LV_Osc[((Level of Lightnin
- Animation - Change TempUnit flying height to TempReal at 1000000000.00
- -------- Moving the first LIGHTNING --------
- Set TempReal_02 = (Load 2 of Key from Lightning_Vortex)
- Set TempLight = (Load 0 of Key in Lightning_Vortex)
- Custom script: call MoveLightningEx(udg_TempLight, true, GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()), 100, GetUnitX(GetEnumUnit()) + udg_LV_L * Cos(udg_TempReal_02 * bj_DEGTORAD), GetUnitY(GetEnumUnit()) + udg_LV_L * Sin(udg_TempReal_02 * bj_DEGTORAD), udg_TempReal)
- -------- Moving the second secondary DUMMY --------
- Set TempReal = (Load 2 of Key from Lightning_Vortex)
- Set TempUnit = (Load 5 of Key in Lightning_Vortex)
- Custom script: call SetUnitX(udg_TempUnit, GetUnitX(GetEnumUnit()) + udg_LV_L * Cos((180 + udg_TempReal) * bj_DEGTORAD))
- Custom script: call SetUnitY(udg_TempUnit, GetUnitY(GetEnumUnit()) + udg_LV_L * Sin((180 + udg_TempReal) * bj_DEGTORAD))
- Set TempReal = (((LV_H x (Power((Sin(((Load 6 of Key from Lightning_Vortex) / LV_Sp[((Level of Lightning Vortex for (Picked unit)) - 1)]))), 2.00))) x (Real(LV_Osc[((Level of Lightning Vortex for (Picked unit)) - 1)]))) x (100.00 x (1.00 - (Real(LV_Osc[((Level of Lightnin
- Animation - Change TempUnit flying height to TempReal at 1000000000.00
- -------- Moving the second LIGHTNING --------
- Set TempReal_02 = (Load 2 of Key from Lightning_Vortex)
- Set TempLight = (Load 1 of Key in Lightning_Vortex)
- -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
- Custom script: call MoveLightningEx(udg_TempLight, true, GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()), 100, GetUnitX(GetEnumUnit()) + udg_LV_L * Cos((180 + udg_TempReal) * bj_DEGTORAD), GetUnitY(GetEnumUnit()) + udg_LV_L * Sin((180 + udg_TempReal) * bj_DEGTORAD), 100)
- -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
- -------- Updating new angle for rotation --------
- Hashtable - Save ((Load 2 of Key from Lightning_Vortex) + (LV_R x 0.03)) as 2 of Key in Lightning_Vortex
- -------- Updating new angle for sinusoidal trayectory --------
- Hashtable - Save ((Load 6 of Key from Lightning_Vortex) + 25.00) as 6 of (Key (Picked unit)) in Lightning_Vortex
-
Other - Actions
- -------- Removing dummies and lightnings --------
- Unit - Remove (Load 3 of (Key (Picked unit)) in Lightning_Vortex) from the game
- Unit - Remove (Load 4 of (Key (Picked unit)) in Lightning_Vortex) from the game
- Unit - Remove (Load 5 of (Key (Picked unit)) in Lightning_Vortex) from the game
- Lightning - Destroy (Load 0 of (Key (Picked unit)) in Lightning_Vortex)
- Lightning - Destroy (Load 1 of (Key (Picked unit)) in Lightning_Vortex)
- Unit Group - Remove (Picked unit) from Lightning_Vortex_Casters
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Lightning_Vortex_Casters and do (Actions)
-
Events
- Custom script: call MoveLightningEx(udg_TempLight, true, GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()), 100, GetUnitX(GetEnumUnit()) + udg_LV_L * Cos((180 + udg_TempReal_02) * bj_DEGTORAD), GetUnitY(GetEnumUnit()) + udg_LV_L * Sin((180 + udg_TempReal_02) * bj_DEGTORAD), udg_TempReal)
Someone knows what could be the reason? I don't even know if this trigger works in-game, because I can't finish it without crashing WE.
If you nedd to see the main trigger where the spell starts, or the setup trigger where the used variables are defined, just ask for it, I'll post it.
Regards