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

[Trigger] Something leaks?

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
772
This is a triggering item-spell that is meant to shot a beam of light to the target enemy unit and damage it for 10x the casters intelligence. I've tested it and it seems working but many players says the beam doesn't do the damage it is supposed to do, like it doesn't include bonuses in intelligence and if that's true what's the problem? And does the kill go to the casting hero or the dummy unit in this spell, if the target is killed by the beam?? Pls look if there is any leaks in this spell..

Here is the triggers..
  • Power Surge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beam of Valinor - (Custom)
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Unit_2 = (Target unit of ability being cast)
      • -------- -------------------- --------
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Loc_2 = (Position of Temp_Unit_2)
      • -------- -------------------- --------
      • Set Temp_Real_1 = (Angle from Temp_Loc_1 to Temp_Loc_2)
      • -------- -------------------- --------
      • Unit - Create 1 Footman - (Dummy) for Neutral Passive at Temp_Loc_1 facing Temp_Real_1 degrees
      • Custom script: call UnitAddAbility(GetLastCreatedUnit(), 'Aloc')
      • Unit Group - Add (Last created unit) to Power_Surge_Group
      • Unit - Move (Last created unit) instantly to Temp_Loc_1, facing Temp_Real_1 degrees
      • Set Temp_Loc_3 = (Position of (Last created unit))
      • -------- -------------------- --------
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • -------- -------------------- --------
      • Custom script: set udg_Temp_Real_2 = GetLocationZ(udg_Temp_Loc_1) + 60
      • Custom script: set udg_Temp_Real_3 = GetLocationZ(udg_Temp_Loc_3) + 60
      • Custom script: set udg_Temp_Lightning = AddLightningEx( "SPLK" , true, GetLocationX(udg_Temp_Loc_1), GetLocationY(udg_Temp_Loc_1), udg_Temp_Real_1, GetLocationX(udg_Temp_Loc_3), GetLocationY(udg_Temp_Loc_3), udg_Temp_Real_2)
      • -------- -------------------- --------
      • Hashtable - Save False as (Key damaged) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save Handle OfTemp_Unit_2 as (Key target) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save Handle Of(Last created special effect) as (Key effect) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save Handle OfTemp_Lightning as (Key lightning) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save (10.00 x (Real((Intelligence of Temp_Unit_1 (Include bonuses))))) as (Key damage) of (Key (Last created unit)) in Power_Surge_Hash
      • Hashtable - Save 0.36 as (Key timer) of (Key (Last created unit)) in Power_Surge_Hash
      • -------- -------------------- --------
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
      • Custom script: call RemoveLocation(udg_Temp_Loc_3)
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Power Surge Shoot <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Power Surge Shoot <gen>
        • Else - Actions
  • Power Surge Shoot
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Power_Surge_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in Power_Surge_Hash)
          • Set Temp_Unit_3 = (Load (Key target) of (Key (Picked unit)) in Power_Surge_Hash)
          • Set Temp_Real_4 = (Load (Key timer) of (Key (Picked unit)) from Power_Surge_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_4 Greater than 0.00
              • (Temp_Unit_2 is alive) Equal to True
              • (Temp_Unit_3 is alive) Equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Loc_2 = (Position of Temp_Unit_2)
              • Set Temp_Loc_3 = (Position of Temp_Unit_3)
              • -------- -------------------- --------
              • Set Temp_Real_1 = (Angle from Temp_Loc_2 to Temp_Loc_3)
              • -------- -------------------- --------
              • Set Temp_Loc_4 = (Temp_Loc_1 offset by Power_Surge_Speed towards Temp_Real_1 degrees)
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between Temp_Loc_3 and Temp_Loc_4) Less than (Power_Surge_Speed x 2.00)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load (Key damaged) of (Key (Picked unit)) from Power_Surge_Hash) Equal to False
                    • Then - Actions
                      • Unit - Cause Temp_Unit_2 to damage Temp_Unit_3, dealing (Load (Key damage) of (Key (Picked unit)) from Power_Surge_Hash) damage of attack type Spells and damage type Normal
                      • -------- -------------------- --------
                      • Hashtable - Save True as (Key damaged) of (Key (Picked unit)) in Power_Surge_Hash
                      • -------- -------------------- --------
                      • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_4 Greater than 0.00
                        • Then - Actions
                          • Hashtable - Save (Temp_Real_4 - 0.03) as (Key timer) of (Key (Picked unit)) in Power_Surge_Hash
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_Temp_Loc_4)
                  • Set Temp_Loc_4 = (Position of Temp_Unit_3)
                • Else - Actions
              • Unit - Move Temp_Unit_1 instantly to Temp_Loc_4
              • -------- -------------------- --------
              • Lightning - Destroy (Load (Key lightning) of (Key (Picked unit)) in Power_Surge_Hash)
              • -------- -------------------- --------
              • Custom script: set udg_Temp_Real_2 = GetLocationZ(udg_Temp_Loc_2) + 60
              • Custom script: set udg_Temp_Real_3 = GetLocationZ(udg_Temp_Loc_4) + 60
              • Custom script: set udg_Temp_Lightning = AddLightningEx( "SPLK" , true, GetLocationX(udg_Temp_Loc_2), GetLocationY(udg_Temp_Loc_2), udg_Temp_Real_2, GetLocationX(udg_Temp_Loc_4), GetLocationY(udg_Temp_Loc_4), udg_Temp_Real_2)
              • -------- -------------------- --------
              • Hashtable - Save Handle OfTemp_Lightning as (Key lightning) of (Key (Picked unit)) in Power_Surge_Hash
              • -------- -------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
              • Custom script: call RemoveLocation(udg_Temp_Loc_4)
            • Else - Actions
              • Lightning - Destroy (Load (Key lightning) of (Key (Picked unit)) in Power_Surge_Hash)
              • Special Effect - Destroy (Load (Key effect) of (Key (Picked unit)) in Power_Surge_Hash)
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Power_Surge_Hash
              • -------- -------------------- --------
              • Unit Group - Remove (Picked unit) from Power_Surge_Group
              • -------- -------------------- --------
              • Unit - Add a 1.00 second Generic expiration timer to Temp_Unit_1
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Power_Surge_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Status
Not open for further replies.
Top