• 🏆 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!

[Crash] why does this trigger crash warcraft?

Status
Not open for further replies.
Level 1
Joined
Jun 11, 2014
Messages
4
drgd.jpg

Copy_of_drgd.jpg


i need this trigger to make like berserk abilities that make the unit more vulnerable to spells and skills as well as normal damage, but it crashes as soon as the unit gets hit, and 100% crashes from 2 units.

i need to know what in this trigger is crashing it because i have similar random crashes with other similarly made triggers and i cant find out what causes them because they only randomly happen, if i knew what caused this crash i could locate what caused the other random unpredictable crashes.

i spent years making my map and theres no error message for these crashes, it just exits wc3 completely without saying anything. this is 1 that consistently crashes though, and i am desperately trying to find an explanation for these errorless crashes that just exit wc3 for no apparent reason.

heres a link to download the test map. all u have to do is get the brilliance aura, cast a spell and then let a unit hit u and it exits wc3 for no apparent reason.
http://www.sendspace.com/file/krcpqt
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
You're dealing with a loop that you can't see.

Archmage detects damage and deals damage to self(wtf?) upon taking damage, so:

Damage taken>
Deal damage>
Damage taken>
Deal damage>
Damage taken>
Deal damage...

It goes on endlessly.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Yeah, what Xonok wrote, although archmage won't deal damage to himself.

When archmage takes damage the trigger fires, you make the unit damage archmage via trigger action. Thus you fire the trigger again, as archmage takes damage once again. This continues endlessly, ending in crash.
 
Level 1
Joined
Jun 11, 2014
Messages
4
i didnt think about the event being re activated by the triggers own action, despite trying so many other things to see what was crashing it, and didnt even think an infinite loop could make it just exit like that.

i still dont know what causes the other random exit-game crashes, but i have much more of an idea now, knowing that an infinite loop exits the game, i should be able to find them if i look carefully, but i don't know. if i don't fix the crashes first, i'll keep making more and more triggers and it will be like finding a needle in a haystack later. i kind of ignored the crashes before because they hardly ever happened and i didnt know where to look.

what other things could cause the game to exit like that, and does anyone know exactly why the game exits without an error message? because that exit game crash is the most common crash i have when playing/testing my map, apart from access violation which happens when 2 different units use the same or a similar ability at the same time that relies on the same or a similar trigger with similar variables for its lightning effects and whatnot.

this access violation crash can happen frequently depending on how many units are using trigger abilities at the same time, but i dont know what access violation at xxxx or something means.

this is one spell trigger i made for enemy units, consisting of 3 triggers. it causes access violation 100% of the time when 2 units cast it at the exact same time.

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Dark Masekhou Blast
    • ((Target unit of ability being cast) is alive) Equal to True
    • ((Casting unit) is being transported) Equal to False
    • ((This trigger) is on) Equal to True
  • Actions
    • Wait 0.33 seconds
    • Sound - Play fingerlaser <gen> at 65.00% volume, skipping the first 0.00 seconds
    • Set Temp_Point = (Position of (Target unit of ability being cast))
    • Set VoltRegionHostile = (Region centered at Temp_Point with size (100.00, 100.00))
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set Temp_Point = (Position of (Target unit of ability being cast))
    • Destructible - Pick every destructible within 170.00 of Temp_Point and do (Actions)
      • Loop - Actions
        • Destructible - Kill (Picked destructible)
    • Set dicerollmasekhohostile = (Random integer number between 1 and 1)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 70.00 at Temp_Point, dealing ((Real((Strength of (Casting unit) (Include bonuses)))) x 1.20) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 170.00 at Temp_Point, dealing ((Real((Strength of (Casting unit) (Include bonuses)))) x 0.20) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 70.00 at Temp_Point, dealing ((Real((Agility of (Casting unit) (Include bonuses)))) x 0.90) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 170.00 at Temp_Point, dealing ((Real((Agility of (Casting unit) (Include bonuses)))) x 0.60) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 70.00 at Temp_Point, dealing ((Real((Intelligence of (Casting unit) (Include bonuses)))) x 1.25) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • If (dicerollmasekhohostile Equal to 1) then do (Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 170.00 at Temp_Point, dealing ((Real((Intelligence of (Casting unit) (Include bonuses)))) x 0.50) damage of attack type Normal and damage type Normal) else do (Do nothing)
    • Do nothing
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[1] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[2] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[3] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[4] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[5] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[6] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[7] = (Last created special effect)
    • Wait 0.01 seconds
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[8] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[9] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[10] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[11] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[12] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[12] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[13] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[14] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[15] = (Last created special effect)
    • Wait 0.01 seconds
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[16] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[17] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[18] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[19] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[20] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[21] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[22] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[23] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[24] = (Last created special effect)
    • Wait 0.01 seconds
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[25] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[26] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[27] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[28] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[29] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[30] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[31] = (Last created special effect)
    • Wait 0.01 seconds
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[32] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[33] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[34] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[35] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[36] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[37] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[38] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[39] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[40] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[41] = (Last created special effect)
    • Wait 0.01 seconds
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[42] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[43] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[44] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[45] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[46] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[47] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[48] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[49] = (Last created special effect)
    • Set Temp_Point = (Random point in VoltRegionHostile)
    • Special Effect - Create a special effect at Temp_Point using Abilities\Weapons\FragDriller\FragDriller.mdl
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set masekhouhostilearray[50] = (Last created special effect)
    • Custom script: call RemoveRect(udg_VoltRegionHostile) //Region



  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Dark Masekhou Blast
  • Actions
    • Wait 0.33 seconds
    • Lightning - Destroy mashostilelightningarray[1]
    • Lightning - Destroy mashostilelightningarray[2]
    • Lightning - Destroy mashostilelightningarray[3]
    • Lightning - Destroy mashostilelightningarray[4]
    • Lightning - Destroy mashostilelightningarray[5]
    • Lightning - Destroy mashostilelightningarray[6]
    • Lightning - Destroy mashostilelightningarray[7]
    • Lightning - Destroy mashostilelightningarray[8]
    • Lightning - Destroy mashostilelightningarray[9]
    • Lightning - Destroy mashostilelightningarray[10]
    • Lightning - Destroy mashostilelightningarray[11]
    • Lightning - Destroy mashostilelightningarray[12]
    • Lightning - Destroy mashostilelightningarray[13]
    • Lightning - Destroy mashostilelightningarray[14]
    • Lightning - Destroy mashostilelightningarray[15]
    • Lightning - Destroy mashostilelightningarray[16]
    • Lightning - Destroy mashostilelightningarray[17]
    • Lightning - Destroy mashostilelightningarray[18]
    • Lightning - Destroy mashostilelightningarray[19]
    • Lightning - Destroy mashostilelightningarray[20]
    • Special Effect - Destroy masekhouhostilearray[1]
    • Special Effect - Destroy masekhouhostilearray[2]
    • Special Effect - Destroy masekhouhostilearray[3]
    • Special Effect - Destroy masekhouhostilearray[4]
    • Special Effect - Destroy masekhouhostilearray[5]
    • Special Effect - Destroy masekhouhostilearray[6]
    • Special Effect - Destroy masekhouhostilearray[7]
    • Special Effect - Destroy masekhouhostilearray[8]
    • Special Effect - Destroy masekhouhostilearray[9]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[11]
    • Special Effect - Destroy masekhouhostilearray[12]
    • Special Effect - Destroy masekhouhostilearray[13]
    • Special Effect - Destroy masekhouhostilearray[14]
    • Special Effect - Destroy masekhouhostilearray[15]
    • Special Effect - Destroy masekhouhostilearray[16]
    • Special Effect - Destroy masekhouhostilearray[17]
    • Special Effect - Destroy masekhouhostilearray[18]
    • Special Effect - Destroy masekhouhostilearray[19]
    • Special Effect - Destroy masekhouhostilearray[20]
    • Special Effect - Destroy masekhouhostilearray[21]
    • Special Effect - Destroy masekhouhostilearray[22]
    • Special Effect - Destroy masekhouhostilearray[23]
    • Special Effect - Destroy masekhouhostilearray[24]
    • Special Effect - Destroy masekhouhostilearray[25]
    • Special Effect - Destroy masekhouhostilearray[26]
    • Special Effect - Destroy masekhouhostilearray[27]
    • Special Effect - Destroy masekhouhostilearray[28]
    • Special Effect - Destroy masekhouhostilearray[29]
    • Special Effect - Destroy masekhouhostilearray[30]
    • Special Effect - Destroy masekhouhostilearray[31]
    • Special Effect - Destroy masekhouhostilearray[32]
    • Special Effect - Destroy masekhouhostilearray[33]
    • Special Effect - Destroy masekhouhostilearray[34]
    • Special Effect - Destroy masekhouhostilearray[35]
    • Special Effect - Destroy masekhouhostilearray[36]
    • Special Effect - Destroy masekhouhostilearray[37]
    • Special Effect - Destroy masekhouhostilearray[38]
    • Special Effect - Destroy masekhouhostilearray[39]
    • Special Effect - Destroy masekhouhostilearray[40]
    • Special Effect - Destroy masekhouhostilearray[41]
    • Special Effect - Destroy masekhouhostilearray[42]
    • Special Effect - Destroy masekhouhostilearray[43]
    • Special Effect - Destroy masekhouhostilearray[44]
    • Special Effect - Destroy masekhouhostilearray[45]
    • Special Effect - Destroy masekhouhostilearray[46]
    • Special Effect - Destroy masekhouhostilearray[47]
    • Special Effect - Destroy masekhouhostilearray[48]
    • Special Effect - Destroy masekhouhostilearray[49]
    • Special Effect - Destroy masekhouhostilearray[50]
    • Set VoltHost1 = (Position of (Casting unit))
    • Set VoltHost2 = (Position of (Target unit of ability being cast))
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[1] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[2] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[3] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[4] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[5] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[6] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[7] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[8] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[9] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[10] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[11] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[12] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[13] = (Last created lightning effect)
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[14] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[15] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[16] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[17] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[18] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[19] = (Last created lightning effect)
    • Wait 0.01 seconds
    • Lightning - Create a Finger of Death lightning effect from source VoltHost1 to target VoltHost2
    • Set mashostilelightningarray[20] = (Last created lightning effect)
    • Custom script: call RemoveLocation (udg_VoltHost1)
    • Custom script: call RemoveLocation (udg_VoltHost2)
    • Wait 0.12 seconds
    • Lightning - Destroy mashostilelightningarray[1]
    • Lightning - Destroy mashostilelightningarray[2]
    • Lightning - Destroy mashostilelightningarray[3]
    • Lightning - Destroy mashostilelightningarray[4]
    • Lightning - Destroy mashostilelightningarray[5]
    • Lightning - Destroy mashostilelightningarray[6]
    • Lightning - Destroy mashostilelightningarray[7]
    • Lightning - Destroy mashostilelightningarray[8]
    • Lightning - Destroy mashostilelightningarray[9]
    • Lightning - Destroy mashostilelightningarray[10]
    • Lightning - Destroy mashostilelightningarray[11]
    • Lightning - Destroy mashostilelightningarray[12]
    • Lightning - Destroy mashostilelightningarray[13]
    • Lightning - Destroy mashostilelightningarray[14]
    • Lightning - Destroy mashostilelightningarray[15]
    • Lightning - Destroy mashostilelightningarray[16]
    • Lightning - Destroy mashostilelightningarray[17]
    • Lightning - Destroy mashostilelightningarray[18]
    • Lightning - Destroy mashostilelightningarray[19]
    • Lightning - Destroy mashostilelightningarray[20]
    • Special Effect - Destroy masekhouhostilearray[1]
    • Special Effect - Destroy masekhouhostilearray[2]
    • Special Effect - Destroy masekhouhostilearray[3]
    • Special Effect - Destroy masekhouhostilearray[4]
    • Special Effect - Destroy masekhouhostilearray[5]
    • Special Effect - Destroy masekhouhostilearray[6]
    • Special Effect - Destroy masekhouhostilearray[7]
    • Special Effect - Destroy masekhouhostilearray[8]
    • Special Effect - Destroy masekhouhostilearray[9]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[11]
    • Special Effect - Destroy masekhouhostilearray[12]
    • Special Effect - Destroy masekhouhostilearray[13]
    • Special Effect - Destroy masekhouhostilearray[14]
    • Special Effect - Destroy masekhouhostilearray[15]
    • Special Effect - Destroy masekhouhostilearray[16]
    • Special Effect - Destroy masekhouhostilearray[17]
    • Special Effect - Destroy masekhouhostilearray[18]
    • Special Effect - Destroy masekhouhostilearray[19]
    • Special Effect - Destroy masekhouhostilearray[20]
    • Special Effect - Destroy masekhouhostilearray[21]
    • Special Effect - Destroy masekhouhostilearray[22]
    • Special Effect - Destroy masekhouhostilearray[23]
    • Special Effect - Destroy masekhouhostilearray[24]
    • Special Effect - Destroy masekhouhostilearray[25]
    • Special Effect - Destroy masekhouhostilearray[26]
    • Special Effect - Destroy masekhouhostilearray[27]
    • Special Effect - Destroy masekhouhostilearray[28]
    • Special Effect - Destroy masekhouhostilearray[29]
    • Special Effect - Destroy masekhouhostilearray[30]
    • Special Effect - Destroy masekhouhostilearray[31]
    • Special Effect - Destroy masekhouhostilearray[32]
    • Special Effect - Destroy masekhouhostilearray[33]
    • Special Effect - Destroy masekhouhostilearray[34]
    • Special Effect - Destroy masekhouhostilearray[35]
    • Special Effect - Destroy masekhouhostilearray[36]
    • Special Effect - Destroy masekhouhostilearray[37]
    • Special Effect - Destroy masekhouhostilearray[38]
    • Special Effect - Destroy masekhouhostilearray[39]
    • Special Effect - Destroy masekhouhostilearray[40]
    • Special Effect - Destroy masekhouhostilearray[41]
    • Special Effect - Destroy masekhouhostilearray[42]
    • Special Effect - Destroy masekhouhostilearray[43]
    • Special Effect - Destroy masekhouhostilearray[44]
    • Special Effect - Destroy masekhouhostilearray[45]
    • Special Effect - Destroy masekhouhostilearray[46]
    • Special Effect - Destroy masekhouhostilearray[47]
    • Special Effect - Destroy masekhouhostilearray[48]
    • Special Effect - Destroy masekhouhostilearray[49]
    • Special Effect - Destroy masekhouhostilearray[50]






  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Dark Masekhou Blast
  • Actions
    • Lightning - Destroy mashostilelightningarray[1]
    • Lightning - Destroy mashostilelightningarray[2]
    • Lightning - Destroy mashostilelightningarray[3]
    • Lightning - Destroy mashostilelightningarray[4]
    • Lightning - Destroy mashostilelightningarray[5]
    • Lightning - Destroy mashostilelightningarray[6]
    • Lightning - Destroy mashostilelightningarray[7]
    • Lightning - Destroy mashostilelightningarray[8]
    • Lightning - Destroy mashostilelightningarray[9]
    • Lightning - Destroy mashostilelightningarray[10]
    • Lightning - Destroy mashostilelightningarray[11]
    • Lightning - Destroy mashostilelightningarray[12]
    • Lightning - Destroy mashostilelightningarray[13]
    • Lightning - Destroy mashostilelightningarray[14]
    • Lightning - Destroy mashostilelightningarray[15]
    • Lightning - Destroy mashostilelightningarray[16]
    • Lightning - Destroy mashostilelightningarray[17]
    • Lightning - Destroy mashostilelightningarray[18]
    • Lightning - Destroy mashostilelightningarray[19]
    • Lightning - Destroy mashostilelightningarray[20]
    • Special Effect - Destroy masekhouhostilearray[1]
    • Special Effect - Destroy masekhouhostilearray[2]
    • Special Effect - Destroy masekhouhostilearray[3]
    • Special Effect - Destroy masekhouhostilearray[4]
    • Special Effect - Destroy masekhouhostilearray[5]
    • Special Effect - Destroy masekhouhostilearray[6]
    • Special Effect - Destroy masekhouhostilearray[7]
    • Special Effect - Destroy masekhouhostilearray[8]
    • Special Effect - Destroy masekhouhostilearray[9]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[10]
    • Special Effect - Destroy masekhouhostilearray[11]
    • Special Effect - Destroy masekhouhostilearray[12]
    • Special Effect - Destroy masekhouhostilearray[13]
    • Special Effect - Destroy masekhouhostilearray[14]
    • Special Effect - Destroy masekhouhostilearray[15]
    • Special Effect - Destroy masekhouhostilearray[16]
    • Special Effect - Destroy masekhouhostilearray[17]
    • Special Effect - Destroy masekhouhostilearray[18]
    • Special Effect - Destroy masekhouhostilearray[19]
    • Special Effect - Destroy masekhouhostilearray[20]
    • Special Effect - Destroy masekhouhostilearray[21]
    • Special Effect - Destroy masekhouhostilearray[22]
    • Special Effect - Destroy masekhouhostilearray[23]
    • Special Effect - Destroy masekhouhostilearray[24]
    • Special Effect - Destroy masekhouhostilearray[25]
    • Special Effect - Destroy masekhouhostilearray[26]
    • Special Effect - Destroy masekhouhostilearray[27]
    • Special Effect - Destroy masekhouhostilearray[28]
    • Special Effect - Destroy masekhouhostilearray[29]
    • Special Effect - Destroy masekhouhostilearray[30]
    • Special Effect - Destroy masekhouhostilearray[31]
    • Special Effect - Destroy masekhouhostilearray[32]
    • Special Effect - Destroy masekhouhostilearray[33]
    • Special Effect - Destroy masekhouhostilearray[34]
    • Special Effect - Destroy masekhouhostilearray[35]
    • Special Effect - Destroy masekhouhostilearray[36]
    • Special Effect - Destroy masekhouhostilearray[37]
    • Special Effect - Destroy masekhouhostilearray[38]
    • Special Effect - Destroy masekhouhostilearray[39]
    • Special Effect - Destroy masekhouhostilearray[40]
    • Special Effect - Destroy masekhouhostilearray[41]
    • Special Effect - Destroy masekhouhostilearray[42]
    • Special Effect - Destroy masekhouhostilearray[43]
    • Special Effect - Destroy masekhouhostilearray[44]
    • Special Effect - Destroy masekhouhostilearray[45]
    • Special Effect - Destroy masekhouhostilearray[46]
    • Special Effect - Destroy masekhouhostilearray[47]
    • Special Effect - Destroy masekhouhostilearray[48]
    • Special Effect - Destroy masekhouhostilearray[49]
    • Special Effect - Destroy masekhouhostilearray[50]
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,378
Ok, I'm not sure what causes your crashes apart from you most likely destroying non-existing lightning - this causes game to crash.
Since the trigger you posted is not MUI (= does not support multiple units casting it at same time), the problem may very well lie in you destroying non-existing lightning.

On a side note:
Waits are inaccurate - a wait of 0.01-0.3 is random and will change with each trigger run (e.g. first time the trigger runs the wait is actually 0.1, while the next time it is 0.27, etc., even though you specify the wait to be 0.01).

Next, you should learn to use loop. This will vastly shorten all your triggers, since you repeat actions many times and it will also be less bug-prone (when you have to make command 50 times, you can make error in some of them - this cannot happen in loop, where you have the command only once, but it is repeated 50 times).
 
Level 1
Joined
Jun 11, 2014
Messages
4
im reading topics on how to do loop integer a now. anyway that spell above i made is nothing compared to the other one i have with about 4000+ actions.

thanks for the tips and its always good to know things that cause crashes, i didn't know the lightning one. i made a text document listing all the crashes/bugs i have had with triggers, because i always run into them.


this skill seems to crash sometimes, other times it doesnt crash at all. most commonly it crashes on the first use. i think theres a memory leak with the unit group, but it shouldnt cause it to crash. also it sometimes kills my casting unit, even when i make it invulnerable before and after the area damage.

  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to aTTACK REAL USABLE!@@@@@@@ (Neutral Hostile)
  • Actions
    • Wait 0.02 seconds
    • Set dicerollcyslash = (Random integer number between 1 and 4)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • dicerollcyslash Equal to 2
      • Then - Actions
        • Sound - Play eBlow2 <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • dicerollcyslash Equal to 3
      • Then - Actions
        • Sound - Play eBlow3 <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • dicerollcyslash Equal to 4
      • Then - Actions
        • Sound - Play eBlow4 <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Else - Actions
    • Wait 0.09 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • dicerollcyslash Equal to 1
      • Then - Actions
        • Sound - Play eBlow1 <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Else - Actions
    • Set Temp_Point = (Position of (Target unit of ability being cast))
    • Set CastingUnitPlayer = (Owner of (Casting unit))
    • Unit Group - Pick every unit in (Units within 50.00 of Temp_Point matching (((Matching unit) belongs to an ally of CastingUnitPlayer) Equal to True)) and do (Unit - Make (Picked unit) Invulnerable)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • IGNOREDEFYESNONOYESNOOKNO Equal to 1
      • Then - Actions
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDPOW x 0.32) damage of attack type Normal and damage type Unknown
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDAGIII x 0.25) damage of attack type Normal and damage type Unknown
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDENG1 x 0.20) damage of attack type Normal and damage type Unknown
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing THOUSANDDMG damage of attack type Normal and damage type Unknown
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing THOUSANDIGNO damage of attack type Normal and damage type Unknown
      • Else - Actions
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDPOW x 0.32) damage of attack type Normal and damage type Normal
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDAGIII x 0.25) damage of attack type Normal and damage type Normal
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing (THOUSANDENG1 x 0.20) damage of attack type Normal and damage type Normal
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing THOUSANDDMG damage of attack type Normal and damage type Normal
        • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 50.00 at Temp_Point, dealing THOUSANDIGNO damage of attack type Normal and damage type Normal
    • Unit Group - Pick every unit in (Units within 50.00 of Temp_Point matching (((Matching unit) belongs to an ally of CastingUnitPlayer) Equal to True)) and do (Unit - Make (Picked unit) Vulnerable)
    • Custom script: call RemoveLocation (udg_Temp_Point)
    • Set Temp_Alpha = (Position of (Target unit of ability being cast))
    • Destructible - Pick every destructible within 50.00 of Temp_Alpha and do (Actions)
      • Loop - Actions
        • Destructible - Kill (Picked destructible)
    • Custom script: call RemoveLocation (udg_Temp_Alpha)
    • -------- lichesneesd to ignore def --------
    • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) + LeechLifeAmmount)
    • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing LeechLifeAmmount damage of attack type Normal and damage type Unknown
    • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + LeechManaAmmount)
    • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - LeechManaAmmount)
    • -------- liches --------

i just noticed that having multiple different flameberge items in my inventory causes the game to crash when using the skill above, next to friendly units and enemies. something in this trigger below may be causing a crash, and i plan to add many more items to it later, since i have only just begun adding items. the purpose of the trigger below is to have spell/skill damage increased from items, have like 10% double damage chance, 5% ignore defense chance, leech life, and other similar options on items. im trying to make a socket item system so i have to make 5 additional items per socket item.

  • Events
    • Unit - A unit owned by Player 1 (Red) Begins casting an ability
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Unit-type of (Casting unit)) Equal to Dark Trojan
        • (Unit-type of (Casting unit)) Equal to Dark Elf
        • (Unit-type of (Casting unit)) Equal to Dark Wizard
  • Actions
    • -------- TO STOP NEXT ATTACK BEING AFFECTED --------
    • Set THOUSANDPOW = (Real((Strength of (Casting unit) (Include bonuses))))
    • Set THOUSANDAGIII = (Real((Agility of (Casting unit) (Include bonuses))))
    • Set THOUSANDENG1 = (Real((Intelligence of (Casting unit) (Include bonuses))))
    • Set THOUSANDDMG = 0.00
    • Set THOUSANDIGNO = 0.00
    • Set Triplex = 3.00
    • Set LeechLifeAmmount = 0.00
    • Set LeechManaAmmount = 0.00
    • Set IGNOREDEFYESNONOYESNOOKNO = 0
    • Set RagefulDiceGenerator = 0
    • Set ElectricDamageBonus = 0.00
    • Set InfernalDamageBonus = 0.00
    • -------- RING OF negavity: chance to negate all damage options/critical hits/attack on hit --------
    • If (((Casting unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set RagefulDiceGenerator = (Random integer number between 1 and 10)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Skip remaining actions) else do (Do nothing)
    • -------- BASIC DAMAGE OPTS AND ELEMENTAL ADDED BELOW NEGATITY@@@@@@@@@@@ --------
    • If (((Casting unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 100.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Small Axe) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 2.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Axe) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 4.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Sword) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 7.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Steel Sword) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 13.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Heavy Axe) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 20.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Broad Sword) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 27.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type |c0080ffffSailors Scimitar|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 43.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Scimitar) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 38.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type |c0080ffffShort Sword|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 22.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Leather Gloves) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 5.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type Sturdy Axe) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 11.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type |c00ffff80Lords Fire Sword|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 35.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type |c00ffff80Asuka|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG + 70.00)) else do (Do nothing)
    • If (((Casting unit) has an item of type |c00ffff80Asuka|r) Equal to True) then do (Set InfernalDamageBonus = (InfernalDamageBonus + 60.00)) else do (Do nothing)
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY BELOW@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY BELOW@@@@@@@@@@@@@@@@@@@@ --------
    • -------- flameberge damage opts --------
    • -------- blue dragon cloak --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r) Equal to True
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Bless]) Equal to True
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Prodigy]) Equal to True
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Reign]) Equal to True
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Sorcery]) Equal to True
            • ((Triggering unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Witchery]) Equal to True
      • Then - Actions
        • Set ElectricDamageBonus = (ElectricDamageBonus + 50.00)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r) Equal to True
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Bless]) Equal to True
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Prodigy]) Equal to True
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Reign]) Equal to True
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Sorcery]) Equal to True
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Witchery]) Equal to True
      • Then - Actions
        • Set THOUSANDDMG = (THOUSANDDMG + 120.00)
        • Set THOUSANDDMG = (THOUSANDDMG + ((Real((Hero level of (Casting unit)))) x 0.25))
      • Else - Actions
    • -------- REIGN WEAPON LEECH AND DBL DMG OPTIONS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Reign]) Equal to True
      • Then - Actions
        • Set LeechLifeAmmount = (LeechLifeAmmount + ((Real((Strength of (Casting unit) (Include bonuses)))) / 2.00))
        • Set RagefulDiceGenerator = (Random integer number between 1 and 7)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG + THOUSANDDMG)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 + THOUSANDENG1)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW + THOUSANDPOW)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII + THOUSANDAGIII)) else do (Do nothing)
        • Set RagefulDiceGenerator = 0
      • Else - Actions
    • -------- REIGN ARMOR SOCKET OPT --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Casting unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Reign]) Equal to True
      • Then - Actions
        • Set THOUSANDPOW = (THOUSANDPOW + (Real((Hero level of (Casting unit)))))
        • Set THOUSANDPOW = (THOUSANDPOW + (Real((Hero level of (Casting unit)))))
      • Else - Actions
    • -------- WITCHERY DSOCKET OPTS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Triggering unit) has an item of type |cffB542FFFlameberge|r{Witchery]) Equal to True
      • Then - Actions
        • Set Triplex = (Triplex x 1.10)
        • Set RagefulDiceGenerator = (Random integer number between 1 and 50)
        • If (RagefulDiceGenerator Equal to 1) then do (Set IGNOREDEFYESNONOYESNOOKNO = 1) else do (Do nothing)
        • Set LeechManaAmmount = (LeechManaAmmount + ((Real((Intelligence of (Casting unit) (Include bonuses)))) / 2.00))
        • Set RagefulDiceGenerator = (Random integer number between 1 and 20)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RagefulDiceGenerator Equal to 1
            • Or - Any (Conditions) are true
              • Conditions
                • (Unit-type of (Casting unit)) Equal to Dark Trojan
                • (Unit-type of (Casting unit)) Equal to Dark Elf
          • Then - Actions
            • If ((Integer((Life of (Target unit of ability being cast)))) Less than (Integer((Life of (Casting unit))))) then do (Unit - Kill (Target unit of ability being cast)) else do (Do nothing)
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • RagefulDiceGenerator Equal to 1
            • (Unit-type of (Casting unit)) Equal to Dark Wizard
          • Then - Actions
            • If ((Integer((Life of (Target unit of ability being cast)))) Less than (Integer((Mana of (Casting unit))))) then do (Unit - Kill (Target unit of ability being cast)) else do (Do nothing)
          • Else - Actions
            • Do nothing
      • Else - Actions
    • -------- BLESSED WEAPON SOCKET OPTS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Triggering unit) has an item of type |cffB542FFFlameberge|r{Bless]) Equal to True
      • Then - Actions
        • Set THOUSANDDMG = (THOUSANDDMG x 1.20)
        • Set THOUSANDENG1 = (THOUSANDENG1 x 1.20)
        • Set THOUSANDAGIII = (THOUSANDAGIII x 1.20)
        • Set THOUSANDPOW = (THOUSANDPOW x 1.20)
      • Else - Actions
    • -------- SORCERY WEAPON SOCKET OPTS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Triggering unit) has an item of type |cffB542FFFlameberge|r{Sorcery]) Equal to True
      • Then - Actions
        • Set InfernalDamageBonus = (InfernalDamageBonus + ((Real((Intelligence of (Casting unit) (Include bonuses)))) / 2.00))
        • Set ElectricDamageBonus = (ElectricDamageBonus + ((Real((Intelligence of (Casting unit) (Include bonuses)))) / 2.00))
        • Set RagefulDiceGenerator = (Random integer number between 1 and 10)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG + THOUSANDDMG)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 + THOUSANDENG1)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW + THOUSANDPOW)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII + THOUSANDAGIII)) else do (Do nothing)
        • Set RagefulDiceGenerator = 0
      • Else - Actions
    • -------- SORCERY ARMOR DEFENSIVE SOCKET OPTS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Casting unit) has an item of type |cffB542FFBlue Dragon Cloak|r{Sorcery]) Equal to True
      • Then - Actions
        • Set THOUSANDDMG = (THOUSANDDMG x 1.05)
        • Set THOUSANDENG1 = (THOUSANDENG1 x 1.05)
        • Set THOUSANDAGIII = (THOUSANDAGIII x 1.05)
        • Set THOUSANDPOW = (THOUSANDPOW x 1.05)
      • Else - Actions
    • -------- PRODIGY WEAPON SOCKET OPTS --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • ((Casting unit) has an item of type |cffB542FFFlameberge|r{Prodigy]) Equal to True
      • Then - Actions
        • Set RagefulDiceGenerator = (Random integer number between 1 and 20)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 3.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 3.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 3.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 3.00)) else do (Do nothing)
        • Set RagefulDiceGenerator = (Random integer number between 1 and 20)
        • If (RagefulDiceGenerator Equal to 1) then do (Set IGNOREDEFYESNONOYESNOOKNO = 1) else do (Do nothing)
        • Set RagefulDiceGenerator = 0
      • Else - Actions
    • -------- SOCKET ITEMS ONLY ABOVE@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY ABOVE@@@@@@@@@@@@@@@@@@@@ --------
    • -------- SOCKET ITEMS ONLY ABOVE@@@@@@@@@@@@@@@@@@@@ --------
    • -------- CRITICAL HITS THIRD@@@@@@@@@@criticals hitFIT@@@@@@@@@@@@@@@@@ --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Casting unit) has an item of type |c00ffff80Lords Plate Armor|r) Equal to True
        • ((Casting unit) has an item of type |c00ffff80Lords Healing Salve|r) Equal to True
        • ((Casting unit) has an item of type |c00ffff80Lords Fire Sword|r) Equal to True
      • Then - Actions
        • Set InfernalDamageBonus = (InfernalDamageBonus + 80.00)
        • Set RagefulDiceGenerator = (Random integer number between 1 and 10)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 2.00)) else do (Do nothing)
        • Set RagefulDiceGenerator = 0
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (((Casting unit) has (Item carried by (Casting unit) in slot 1)) Equal to ((Casting unit) has an item of type |c00ffff80Asuka|r)) and (((Casting unit) has (Item carried by (Casting unit) in slot 2)) Equal to ((Casting unit) has an item of type |c00ffff80Asuka|r))
      • Then - Actions
        • Set InfernalDamageBonus = (InfernalDamageBonus + 120.00)
        • Set RagefulDiceGenerator = (Random integer number between 1 and 5)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 2.00)) else do (Do nothing)
        • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 2.00)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDPOW = (THOUSANDPOW x 2.00)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 2.00)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 2.00)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG x 2.00)) else do (Do nothing)
        • Set RagefulDiceGenerator = 0
      • Else - Actions
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDPOW = (THOUSANDPOW x 1.40)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 1.40)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 1.40)) else do (Do nothing)
        • If (((Casting unit) has buff ASUKA ) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG x 1.40)) else do (Do nothing)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Casting unit) has buff ASUKA ) Equal to True
      • Then - Actions
        • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - ((Max life of (Casting unit)) x 0.08))
      • Else - Actions
    • If (((Casting unit) has an item of type |c00ffff80Lords Fire Sword|r) Equal to True) then do (Set RagefulDiceGenerator = (Random integer number between 1 and 10)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 1.50)) else do (Do nothing)
    • Set RagefulDiceGenerator = 0
    • If (((Casting unit) has an item of type |c0080ffffShort Sword|r) Equal to True) then do (Set RagefulDiceGenerator = (Random integer number between 1 and 10)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 1.50)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 1.50)) else do (Do nothing)
    • Set RagefulDiceGenerator = 0
    • If (((Casting unit) has an item of type |c0080ffffSailors Scimitar|r) Equal to True) then do (Set RagefulDiceGenerator = (Random integer number between 1 and 10)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDPOW = (THOUSANDPOW x 1.30)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 1.30)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 1.30)) else do (Do nothing)
    • If (RagefulDiceGenerator Equal to 1) then do (Set THOUSANDDMG = (THOUSANDDMG x 1.30)) else do (Do nothing)
    • Set RagefulDiceGenerator = 0
    • -------- SECOND LAST (DAMAGE PERCENT) INCREASE OR DECREASE --------
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDPOW = (THOUSANDPOW x 1.25)) else do (Do nothing)
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDAGIII = (THOUSANDAGIII x 1.25)) else do (Do nothing)
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDENG1 = (THOUSANDENG1 x 1.25)) else do (Do nothing)
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDDMG = (THOUSANDDMG x 1.25)) else do (Do nothing)
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set THOUSANDIGNO = (THOUSANDIGNO x 1.25)) else do (Do nothing)
    • -------- SECOND LAST COMBO DAMAGE (DAMAGE PERCENT) INCREASE OR DECREASE --------
    • If (((Triggering unit) has an item of type |cffFF4565Rainbow Rock|r) Equal to True) then do (Set Triplex = (Triplex x 2.00)) else do (Do nothing)
    • -------- COMBO DAMAGE 15 25 40 70 --------
    • Set RagefulDiceGenerator = 0
    • -------- LEECH 5 LIFE --------
    • If (((Casting unit) has an item of type Shadow Vault Incantation (Verse 1)) Equal to True) then do (Set LeechLifeAmmount = 5.00) else do (Do nothing)
    • -------- LEECH MANA --------
    • If (((Casting unit) has an item of type Shadow Vault Incantation (Verse 1)) Equal to True) then do (Set LeechManaAmmount = 5.00) else do (Do nothing)
    • -------- ACTIVATE ATTACK ON ATTACK va;lid on casting unit only --------



also i know that these types of triggers (below) play a part in crashes, which is why i put a wait action. is there anything else i can use besides unit casts ability? because time elapsed does not work, and i tested a few others like map initialization, they just dont add the event unit takes damage to the other trigger at all. if only there was a way to have the event there by default because doing it this way seems glitchy.
i think it crashes if the trigger gets destroyed before its completely finished excecuting, but i dont know how to make it check that its finished before destroying itself. since there will be so many triggers and limited game memory, i need to destroy as many triggers as i can.

  • Events
    • Unit - A unit owned by Player 1 (Red) Begins casting an ability
  • Actions
    • Wait 7.00 seconds
    • Trigger - Add to MOST DEFENSIVE TYPES AND ITEMS <gen> the event (Unit - Hero[1000] Takes damage)
    • Trigger - Turn off (This trigger)
    • Wait 10.00 seconds
    • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
About copying a trigger:
Instead of copying parts of trigger, you can copy trigger whole. The line above "Events" has a white paper-sheet-like icon with the trigger's name. Right-click the paper-sheet and select "copy as text" -> you will copy the whole trigger, instead of only events/conditions/actions as you do now.

The first trigger:
1) use "Start the effect of an ability" event. Begins casting an event is more like for checking stuff, etc.

2) You have 2 unit group leaks. When you create unit group that is not assigned into any variable, use the following custom script right before making the unit group:
  • Custom script: set bj_wantDestroyGroup = true
3) Try to avoid "waits". They are inaccurate (a wait of 0.01-0.3 is random time in that interval, not what you set up, this also changes each time for each wait and the wait time is also prolonged by player's ping).

4) (Target unit of ability being cast) and (Casting unit) are the same as global variables - they point at the last target and caster of any ability cast in the game. This is more problematic when there are waits in the trigger (which they are in your case), because as they are inaccurate, the wait window may be greater than you expect and during that period both (Target unit...) and (Casting unit) may get overwritten.
Notice: This is not the case of (Triggering unit)! Even though (Triggering unit) is the same as (Casting unit), they both work differently - (Triggering unit) won't get overwritten.

5) You pick every unit within 50.0 range of target. Range 50 is really small - the basic melee range between two melee units is 100.00 range, so you will most likely end up with picking the targeted unit anyway (or any flying unit above the target).

6) Instead of picking all units nearby target, making allies of caster invulnerable and then using the action "Damage circular area", pick into unit group only the enemies of the caster and use the action "Damage unit".

7) Same with destructibles - 50.0 range is really small, you will most likely pick no destructible. Also, as said before, target of ability may be completely different unit after the wait, so you may end up destroying other destructibles that you don't want to.

8) I don't get why don't you reuse Temp_Point for the destructible pick. You basically set Temp_Point = position of target -> do something -> remove Temp_Point -> set Temp_Point again (but now the variable has just different name) -> do something -> remove Temp_Point.
You can just set Temp_Point once, do some things with it (damage units, then damage destructibles) and then remove it at the end.

9) Dunno where you set LeechLifeAmmount, but can't that value be for example negative? That way you could actually damage your own hero.

10) Dunno why sometimes your hero dies, apart from the possibility that the (Target unit of ability being cast) was your own hero after waits -> then your own hero would get damaged and could die.

I suggest getting rid of waits - even if the spell may not visually look great (deals damage too early), you may find out it fixes your spell -> from there you can go on and for example use timers instead of waits.
Second trigger:
While it may be a lot of work at the start, you may want to save all those items into "item-type" array variable. Same with the amount of damage it increases. Then use loops.
So you would end up with something like
  • Set Item_type[1] = Axe
  • Set Bonus_dmg[1] = 4.00
  • Set Item_type[2] = Sword
  • Set Bonus_dmg[2] = 7.00
Notice how bonus damage of each weapon has same index as that weapon. (axe item-type and its bonus damage both have index 1, while sword and its bonus damage index 2, and so on).
And in the final trigger you would have something like:
  • For each (Integer loop_int) from 1 to X, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type item_type[loop_int]) Equal to True
        • Then - Actions
          • Set THOUSANDDMG = (THOUSANDDMG + bonus_dmg[loop_int])
        • Else - Actions
where loop_int is integer variable and the "X" is the index of the last item-type you indexed via the method above.

I would also change when you calculate this bonus damage and save it into hashtable for example.
Instead of calculating the damage whenever unit begins casting an ability, I would calculate the damage when unit acquires and loses an item.
Then save the final damage into hashtable. And when unit starts an actual spell, you just load the saved value from hashtable.
The reason is that you may expect that units will cast spells more often than they acquire/lose items and also when unit starts casting spell, it does not mean that it also got different items than the previous time.

This second trigger will also interfere badly with the first trigger.
Look at the situation:
Unit begins casting an ability:
First trigger: wait
Second trigger: calculates damage for caster of first trigger, places it into global variables
...
when the wait is still taking time, another unit may cast any ability:
Second trigger: calculates damage for the new unit, places it into the very same global variables
...
wait ends, first trigger from before is taking place...

As I wrote before, after wait the target unit may even end up to be the caster of the first spell and by this time the global variables will even have different values than expected (for example many times greater).

There is another problem: Both the first trigger and the second one use same event. The first trigger that fires will most likely be the trigger which is placed higher in the trigger editor. So if your damage calculation trigger is below the first (spell) trigger, you won't even calculate damage immediately.

---
Also, I don't know what exactly are you trying to achieve with the socket items, but I think you could use item recipe system found on this site.
Third trigger:
The second wait in there is unnecessary -> the trigger won't fire anyway, because you already turned it off (unless something else may turn it back on in that 10 second wait).
I would highly suggest using DDS as that efficiently catches when unit takes damage. The way you have it may end up really inefficient. DDS has also other cool uses (like modification of the damage taken, etc.)
 
Level 1
Joined
Jun 11, 2014
Messages
4
reply to first trigger:

1. what do you mean by for checking stuff? i cant remember what the differences were for starts the effect and begins casting, but on some spells/skills there is a longer delay with starts the effect, thats all i know.

2. you said i have 2 unit group leaks, does that script fix both memory leaks?

4. the casting unit and target unit thing you mentioned now, i thought could be the cause of the crash but i changed it to triggering unit, and it still crashed. after many times testing it and disabling triggers i finally found it was a stupid mistake i made. i had another unit takes damage trigger that was using the flameberge items and looping infinitely that i forgot about, but it looked like it was crashing when i attacked monsters the whole time, in fact it was only crashing when my unit was being hit, detecting damage then dealing damage to self.

8. im aware of that, it was just me being clumsy. i added the destructible part later on, or maybe there was a wait between them.
also, i stopped using temp_point for new triggers and started using temp_alpha because im not sure if using temp_point can conflict with another temp_point. for example if a unit casts an ability that uses temp_point in a trigger for area of effect damage, another trigger might be using temp_point at the exact same time, and cause the spell to do damage in the other temp_point instead of the intended target, or overlap with the other temp_point and crash the game.

9. the leech life and leech mana is increased in the second trigger by items only. also it actually takes the life/mana from the target unit and transfers it to your unit, i have tested it. its just checking in the first trigger if there is leech life, if there isnt, it doesnt do anything because it will just be zero.

10. so can i do something like this using a Real variable and it will wait the right amount of time? because i really need the wait command for a lot of things, i cant make triggers without it. some spells/skills just dont work at all without wait commands.
  • Set Timer = 0.02
  • Wait Timer seconds

my friend who is a programmer told me too many arrays use a ton of memory wc3 does not have since its an old game, otherwise i would go crazy with arrays. one time i did and my triggers would not load at all ingame, the way i fixed it was by just deleting the arrays i didnt use/need. here is some of an email he sent me: [anyway.. try not use too many arrays, that is hero[1000] is a rather large array. wc3 is old and doesn't have a very large amount of accessible memory. if you NEED to use an array, try making it smaller, like hero[20].... i don't know if this will work, but i remember that this was always a problem with wc3.]

loop also doesn't give as much freedom as the method i currently use, which lets me create each item individually without choosing from the arrays i will have to make for every single option for every item in the game, there is no telling how many leech life times level, int, str, leech this or that or critical hit multiplying str, mana damage and do damage with explosion area of effect, mana converted to dealing damage, some examples of options i will later add to items, so like 200 array variables each having the number of items i make equals no triggers.

are you sure the triggers fire from the highest to the lowest if they have the same events? its useful to know this for other triggers i might make which use the same event, and the damage calculation trigger luckily was already above all the skills, like, just above them all perfectly. i thought there might be a problem with it but there have been none yet.

im not sure where to find info on the damage detection system, i have searched for it, but it looks like i need to be a programmer to learn it and i know nothing about programming or jass. as long as there are no crashes or memory leaks, and the triggers i make dont take much longer than is necessary, im happy.

one thing that really bothers me is i cant target destructibles with skills that need a target, like thunderbolt or chain lightning type skills which i use as the base for the targeting skills.

i wish there was an easy way to make items like +1 and +2 with another item, without creating an entirely new item with the +1 on it. and i made the socket item system to add a kind of interesting element to some items, even if i dont make that many socket items because they take quite a while longer than normal items, since i have to make 5 more items for each socket type. right now i have normal items, rare items, socket items, excellent items(basically rare items with an ability and different coloured text) and set items(which need to all be in the inventory at once to recieve the bonus). the other one i am going to make next is the fusion/recipe items, that combine together to form 1 stronger item, my friend made me the trigger long ago but i think i deleted it by mistake. having more item types that use different systems does not take any longer to make, it just makes items more interesting. obviously i will make more of the items that are easier to make, but variety is always good.

right now everything is looking stable as far as crashes are concerned, that loop damage taken seems to have been the main cause of the crashes. but i will have to test it more later.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
1.
It goes like this:
You order unit to cast some ability
Unit turns to target and gets close to target
Unit Begins Casting an ability Event - no mana is drained by the spell, spell's cooldown did not start yet.
Wait time equal to that unit's Art - Cast Point field
Unit Starts the effect of an ability - mana is drained, spell's cooldown stars

The difference is that the one fires later than the oter, but the more important thing is that with the "Start the effect..." mana is drained and cooldown started - so you cannot abuse this by cancelling the spell and then firing it immediately again.
So it is actually meant more for checking stuff - for example if you want your spell to target undead only, you can use the Begins casting an ability event to check if the target is indeed undead and if no, you stop the caster from casting the spell.

2.
The custom script "tells" the game that the next created unit group should be destroyed.
It will thus take care of memory leak, but you need to use the custom script before each unit group you want to destroy with this custom script.

4.
It most likely wouldn't cause crash, what I tried to point out though was that the way you have your spell set up, you may damage completely different units than what you targeted with your spell.
From personal experience, when you create some stuff, immediately test it if it works. Don't create 20 things (long scripts) and then test them together, or that you create some stuff and don't test it at all and then you go for example sleep - you will forget that trigger/spell and it may cause crashes due to bad coding but you'll have hard time pinpointing where the problem is since you didn't even test the spell before and you may forget about it at all or you have suddenly way too much code to test.

8.
No two triggers ever fire simultaneously - they fire in sequence one after another - the difference in time they fire can even be just a 0.00001 second difference, but it is difference nonetheless.
If you have trigger, which does not use any waits, no temporal variable inside such trigger will get overwritten by the same temporal variable in other trigger. That won't happen.
For example your second trigger in your previous post has no wait in there. If you use temporal variable in there, they won't get overwritten by any other trigger.

The only exception is the action:
  • Trigger - Fire Your_Trigger (Checking/Ignoring Conditions)
A trigger with this action in it will fire action commands in sequence one after another, then, when it gets to this command, it fires the trigger specified in the command and after that trigger finishes, it returns back to the first trigger and finish that one.

10.
That's not timer.
You need to create variable of type timer
Then you fire the timer by using
  • Countdown Timer - Start Your_Timer as a One-Shot/Repeating timer...
and in another trigger create an event
  • Time - Your_Timer expires
Timers are exact, they are not prolonged by player's ping, etc.
You have to split your trigger into two - one that fires when spell is cast and the rest is after the "wait" - this will be in the second trigger which is fire when your timer expires.
You can even use the same timer multiple times, etc.
It may seem complicated at first, but it is far better solution.

my friend who is a programmer told me too many arrays use a ton of memory wc3 does not have since its an old game, otherwise i would go crazy with arrays. one time i did and my triggers would not load at all ingame, the way i fixed it was by just deleting the arrays i didnt use/need. here is some of an email he sent me: [anyway.. try not use too many arrays, that is hero[1000] is a rather large array. wc3 is old and doesn't have a very large amount of accessible memory. if you NEED to use an array, try making it smaller, like hero[20].... i don't know if this will work, but i remember that this was always a problem with wc3.]
The problem with arrays is that they're not like in C/C++ or other programming languages, where you specify the amount of slots the array has.
WCIII's variable is either non-array (has 1 slot) or is an array (has 8192 slots starting from 0 to 8191) that's a lot of unused slots.
There's also another thing. When you create array (by checking the "array" box in variable editor), there's an "Array size" field. The best is to leave number 1 there. It has no influence on how many slots the variable will have, but on how many are initialized. If you put high value everywhere, the map initialization may "overload" (for the lack of a better word) and won't initialize properly.
That's all the problem I know about.

loop also doesn't give as much freedom as the method i currently use, which lets me create each item individually without choosing from the arrays i will have to...
Depends what you want to do. But it is always better to think of how to optimize your trigger and make it easier to read.
It's all about set up. However if you don't feel Ok with using loops, etc., it's your choice.

are you sure the triggers fire from the highest to the lowest if they have the same events?
Actually I myself have never checked it. I go by what people here over the years wrote.
If it weren't that way, then I imagine it will be from the oldest trigger to the newest.

im not sure where to find info on the damage detection system, i have searched for it, but it looks like i need to be a programmer to learn it and i know nothing about programming or jass.
You don't really have to understand how it works. You just have to find a GUI dds, not jass/vjass DDS.
Every DDS should have notes on how to import and make it work and an example trigger using the DDS. It's all about knowing which variable to use for event and which use to refer to source of damage and target of damage, etc.

one thing that really bothers me is i cant target destructibles with skills th...
Yeah, i believe you'll have to use an ability which targets trees by default. For example huntress' scout ability (or how's its name).
 
Status
Not open for further replies.
Top