Hi,
when I cast this ability about 50 to 100 times the game crashes, can it be that when you save too many units in variables Warcraft is overloaded?
How can I solve this problem?
when I cast this ability about 50 to 100 times the game crashes, can it be that when you save too many units in variables Warcraft is overloaded?
How can I solve this problem?
-
Alpha Strike
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to SpAlphaStrike
-
-

Actions
-


-------- Set General Variables --------
-


Set VariableSet SPG_ALS_Spell = SpAlphaStrike
-


Set VariableSet SPG_ALS_DamageFlatt = SpAlphaStrikeFlatt
-


Set VariableSet SPG_ALS_DamageFlattF = SpAlphaStrikeFlattF
-


Set VariableSet SPG_ALS_DamagePercent = SpAlphaStrikePercent
-


Set VariableSet SPG_ALS_DamagePercentF = SpAlphaStrikePercentF
-


Set VariableSet SPG_ALS_DamageUnitTrigger = HeroBlademaster
-


Set VariableSet SPG_ALS_DamageAbilityLevel = (Real((Level of SPG_ALS_Spell for SPG_ALS_DamageUnitTrigger)))
-


Set VariableSet SPG_ALS_DamageStats = Hero_Damage[(Player number of (Owner of SPG_ALS_DamageUnitTrigger))]
-


-------- Calculate Damage --------
-


Set VariableSet SpAlphaStrikeDamage = (((SPG_ALS_DamageFlatt x SPG_ALS_DamageAbilityLevel) + SPG_ALS_DamageFlattF) + (SPG_ALS_DamageStats x ((SPG_ALS_DamageAbilityLevel x SPG_ALS_DamagePercent) + SPG_ALS_DamagePercentF)))
-


-------- Spell --------
-


Unit - Hide HeroBlademaster
-


Set VariableSet SpAlphaStrikeEnemis[0] = (Target unit of ability being cast)
-


Set VariableSet SpAlphaStrikePoint = (Position of SPG_ALS_DamageUnitTrigger)
-


For each (Integer A) from 0 to (((Integer(SPG_ALS_DamageAbilityLevel)) x 2) + 2), do (Actions)
-



Loop - Actions
-




Special Effect - Create a special effect attached to the origin of SpAlphaStrikeEnemis[(Integer A)] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodPriest.mdl
-




Special Effect - Destroy (Last created special effect)
-




Unit - Create 1 AlphaStrike (Dummy) for (Owner of SPG_ALS_DamageUnitTrigger) at SpAlphaStrikePoint facing 0.00 degrees
-




Unit - Set Base Damage of (Last created unit) to (Integer(SpAlphaStrikeDamage)) for weapon index: 0
-




Unit - Order (Last created unit) to Attack SpAlphaStrikeEnemis[(Integer A)]
-




Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-




Custom script: call RemoveLocation(udg_SpAlphaStrikePoint)
-




Set VariableSet SpAlphaStrikePoint = (Position of SpAlphaStrikeEnemis[(Integer A)])
-




Unit Group - Pick every unit in (Units within 500.00 of SpAlphaStrikePoint.) and do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[0]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[1]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[2]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[3]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[4]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[5]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[6]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[7]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[8]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[9]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[10]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[11]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[12]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[13]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[14]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[15]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[16]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[17]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[18]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[19]
-








(Picked unit) Not equal to SpAlphaStrikeEnemis[20]
-








((Picked unit) is alive) Equal to Wahr
-








((Owner of (Picked unit)) is an enemy of (Owner of SPG_ALS_DamageUnitTrigger).) Equal to Wahr
-
-







Then - Actions
-








Set VariableSet SpAlphaStrikeEnemis[((Integer A) + 1)] = (Picked unit)
-
-







Else - Actions
-
-
-
-
-
-


Wait 1.00 seconds
-


Unit - Move HeroBlademaster instantly to SpAlphaStrikePoint
-


Unit - Unhide HeroBlademaster
-


Selection - Select HeroBlademaster for (Owner of SPG_ALS_DamageUnitTrigger)
-


For each (Integer A) from 0 to 20, do (Actions)
-



Loop - Actions
-




Set VariableSet SpAlphaStrikeEnemis[(Integer A)] = No unit
-
-
-


Custom script: call RemoveLocation(udg_SpAlphaStrikePoint)
-
-

