• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Causes Crash

Status
Not open for further replies.
For those who read this
Can you help me?
[trigger=]TS Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TS_LoopGroup is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Unit Group - Pick every unit in TS_LoopGroup and do (Actions)
Loop - Actions
Set TS_Caster = (Picked unit)
Custom script: set udg_TS_Key = GetHandleId(udg_TS_Caster)
Set TS_Level = (Level of Thunder Storm for TS_Caster)
Set TS_Owner = (Owner of TS_Caster)
Set TS_Duration = (TS_DurationBase + (TS_DurationPerLevel x (Real(TS_Level))))
Set TS_Damage = (TS_DamageBase + (TS_DamagePerLevel x (Real(TS_Level))))
Set TS_CurrentDuration = (Load 0 of TS_Key from TS_Hash)
Set TS_LightningIndex = (Load 1 of TS_Key from TS_Hash)
Set TS_CurrentInterval = (Load 2 of TS_Key from TS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TS_Caster is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TS_CurrentDuration Less than TS_Duration
Then - Actions
For each (Integer Integer) from 1 to 4, do (Actions)
Loop - Actions
Set TS_Lightning = (Load (2 + Integer) of TS_Key in TS_Hash)
Set TS_Fade = (Load (6 + Integer) of TS_Key from TS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TS_Fade Greater than TS_LDuration
Then - Actions
Lightning - Destroy TS_Lightning
Else - Actions
Lightning - Change color of TS_Lightning to (1.00 1.00 1.00) with (1.00 - (TS_Fade + 0.03)) alpha
Hashtable - Save (TS_Fade + 0.03) as (6 + Integer) of TS_Key in TS_Hash
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TS_CurrentInterval Greater than TS_BoltInterval
Then - Actions
Set TS_Loc = (Position of TS_Caster)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TS_LightningIndex Less than or equal to 4
Then - Actions
Set TS_LightningIndex = (TS_LightningIndex + 1)
Else - Actions
Set TS_LightningIndex = 1
Set TS_Distance[1] = (Random real number between 0.00 and TS_LMaxDistance)
Set TS_Angle[1] = (Random angle)
Set TS_Offset[1] = (TS_Loc offset by TS_Distance[1] towards TS_Angle[1] degrees)
Custom script: set udg_TS_SourceX = GetLocationX(udg_TS_Offset[1])
Custom script: set udg_TS_SourceY = GetLocationY(udg_TS_Offset[1])
Custom script: set udg_TS_SourceZ = udg_TS_LHeight
Set TS_Distance[2] = (Random real number between 0.00 and TS_LMaxDistance)
Set TS_Angle[2] = (Random angle)
Set TS_Offset[2] = (TS_Loc offset by TS_Distance[2] towards TS_Angle[2] degrees)
Custom script: set udg_TS_TargetX = GetLocationX(udg_TS_Offset[2])
Custom script: set udg_TS_TargetY = GetLocationY(udg_TS_Offset[2])
Custom script: set udg_TS_TargetZ = 0
Custom script: set udg_TS_Lightning = AddLightningEx(udg_TS_LModel,true,udg_TS_SourceX,udg_TS_SourceY,udg_TS_SourceZ,udg_TS_TargetX,udg_TS_TargetY,udg_TS_TargetZ)
Hashtable - Save Handle OfTS_Lightning as (2 + TS_LightningIndex) of TS_Key in TS_Hash
Hashtable - Save 0.00 as (6 + TS_LightningIndex) of TS_Key in TS_Hash
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within TS_BoltRadius of TS_Offset[1] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of TS_Ow and do (Actions)
Loop - Actions
Unit - Cause TS_Caster to damage (Picked unit), dealing TS_Damage damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the chest of (Picked unit) using TS_DamageSFX
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at TS_Offset[2] using TS_ImpactSFX
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_TS_Loc)
Custom script: call RemoveLocation(udg_TS_Offset[1])
Custom script: call RemoveLocation(udg_TS_Offset[2])
Hashtable - Save 0.00 as 2 of TS_Key in TS_Hash
Hashtable - Save TS_LightningIndex as 1 of TS_Key in TS_Hash
Else - Actions
Hashtable - Save (TS_CurrentInterval + 0.03) as 2 of TS_Key in TS_Hash
Hashtable - Save (TS_CurrentDuration + 0.03) as 0 of TS_Key in TS_Hash
Else - Actions
Set TS_Lightning = (Load 6 of TS_Key in TS_Hash)
Lightning - Destroy TS_Lightning
Hashtable - Clear all child hashtables of child TS_Key in TS_Hash
Unit Group - Remove TS_Caster from TS_LoopGroup
Else - Actions
Set TS_Lightning = (Load 6 of TS_Key in TS_Hash)
Lightning - Destroy TS_Lightning
Hashtable - Clear all child hashtables of child TS_Key in TS_Hash
Unit Group - Remove TS_Caster from TS_LoopGroup
[/trigger]

In this trigger,there are some actions that i dont know that causes crash.

+rep
 
Status
Not open for further replies.
Top