- Joined
- Jul 19, 2007
- Messages
- 942
I have 2 spells in my map that sometimes bugs the kill-credit. The first spell is a "Charge" ability and sometimes when using it and the caster dies during it, the kill-credit goes to the caster that it has killed itself :-/
-
Charge Init
-

Events
-


Time - Elapsed game time is 0.00 seconds
-
-

Conditions
-

Actions
-


-------- ------------------------- --------
-


-------- Create hashtable for storing data --------
-


-------- ------------------------- --------
-


Hashtable - Create a hashtable
-


Set VariableSet EC_Hash = (Last created hashtable)
-


-------- ------------------------- --------
-


-------- Base damage --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[0] = 20.00
-


-------- ------------------------- --------
-


-------- Level bonus damage --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[1] = 55.00
-


-------- ------------------------- --------
-


-------- Initial speed of the charge --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[2] = 8.00
-


-------- ------------------------- --------
-


-------- Max speed of the charge --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[3] = 25.00
-


-------- ------------------------- --------
-


-------- Knockback range --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[4] = 192.00
-


-------- ------------------------- --------
-


-------- Knockback max speed --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[5] = 30.00
-


-------- ------------------------- --------
-


-------- Charge acceleration multiplier ( 1 = no acceleration) --------
-


-------- ------------------------- --------
-


Set VariableSet EC_Reals[6] = 1.20
-


-------- ------------------------- --------
-
-
-
Charge
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Charge
-
-

Actions
-


Set VariableSet Temp_Unit_1 = (Triggering unit)
-


Set VariableSet Temp_Loc_1 = (Position of Temp_Unit_1)
-


Set VariableSet Temp_Loc_2 = (Target point of ability being cast)
-


-------- ------------------------- --------
-


Unit - Turn collision for Temp_Unit_1 Off.
-


-------- ------------------------- --------
-


Set VariableSet Temp_Real_1 = (Distance between Temp_Loc_1 and Temp_Loc_2)
-


Set VariableSet Temp_Real_2 = (EC_Reals[0] + (EC_Reals[1] x (Real((Level of (Ability being cast) for Temp_Unit_1)))))
-


-------- ------------------------- --------
-


Special Effect - Create a special effect attached to the left foot of Temp_Unit_1 using Abilities\Weapons\Bolt\BoltImpact.mdl
-


Hashtable - Save Handle Of(Last created special effect) as (Key effect_1.) of (Key (Triggering unit).) in EC_Hash.
-


Special Effect - Create a special effect attached to the right foot of Temp_Unit_1 using Abilities\Weapons\Bolt\BoltImpact.mdl
-


Hashtable - Save Handle Of(Last created special effect) as (Key effect_2.) of (Key (Triggering unit).) in EC_Hash.
-


Special Effect - Create a special effect attached to the left hand of Temp_Unit_1 using Abilities\Weapons\Bolt\BoltImpact.mdl
-


Hashtable - Save Handle Of(Last created special effect) as (Key effect_3.) of (Key (Triggering unit).) in EC_Hash.
-


Special Effect - Create a special effect attached to the right hand of Temp_Unit_1 using Abilities\Weapons\Bolt\BoltImpact.mdl
-


Hashtable - Save Handle Of(Last created special effect) as (Key effect_4.) of (Key (Triggering unit).) in EC_Hash.
-


-------- ------------------------- --------
-


Hashtable - Save 0.00 as (Key distance.) of (Key (Triggering unit).) in EC_Hash.
-


Hashtable - Save EC_Reals[2] as (Key speed.) of (Key (Triggering unit).) in EC_Hash.
-


Hashtable - Save Temp_Real_2 as (Key damage.) of (Key (Triggering unit).) in EC_Hash.
-


Hashtable - Save Temp_Real_1 as (Key distance_max.) of (Key (Triggering unit).) in EC_Hash.
-


Hashtable - Save (Angle from Temp_Loc_1 to Temp_Loc_2) as (Key angle.) of (Key (Triggering unit).) in EC_Hash.
-


-------- ------------------------- --------
-


Custom script: call RemoveLocation(udg_Temp_Loc_1)
-


Custom script: call RemoveLocation(udg_Temp_Loc_2)
-


-------- ------------------------- --------
-


Unit Group - Add Temp_Unit_1 to EC_Group
-


-------- ------------------------- --------
-


Trigger - Turn on Charge Loop <gen>
-
-
-
Charge Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Number of units in EC_Group) Greater than 0
-
-



Then - Actions
-




Unit Group - Pick every unit in EC_Group and do (Actions)
-





Loop - Actions
-






Set VariableSet Temp_Unit_1 = (Picked unit)
-






Set VariableSet Temp_Real_1 = (Load (Key distance.) of (Key (Picked unit).) from EC_Hash.)
-






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







If - Conditions
-








(Temp_Unit_1 is alive) Equal to True
-








Temp_Real_1 Less than (Load (Key distance_max.) of (Key (Picked unit).) from EC_Hash.)
-
-







Then - Actions
-








Set VariableSet Temp_Loc_1 = (Position of Temp_Unit_1)
-








-------- -------------------- --------
-








Set VariableSet Temp_Real_2 = (Load (Key angle.) of (Key (Picked unit).) from EC_Hash.)
-








Set VariableSet Temp_Real_3 = ((Load (Key speed.) of (Key (Picked unit).) from EC_Hash.) x EC_Reals[6])
-








-------- -------------------- --------
-








Set VariableSet Temp_Real_4 = ((X of Temp_Loc_1) + (Temp_Real_3 x (Cos(Temp_Real_2))))
-








Set VariableSet Temp_Real_5 = ((Y of Temp_Loc_1) + (Temp_Real_3 x (Sin(Temp_Real_2))))
-








-------- -------------------- --------
-








Set VariableSet Temp_Loc_2 = (Point(Temp_Real_4, Temp_Real_5))
-








-------- -------------------- --------
-








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









If - Conditions
-










(Terrain pathing at Temp_Loc_2 of type Walkability is off) Equal to False
-
-









Then - Actions
-










Custom script: call SetUnitX(udg_Temp_Unit_1, udg_Temp_Real_4)
-










Custom script: call SetUnitY(udg_Temp_Unit_1, udg_Temp_Real_5)
-










Set VariableSet Temp_Real_4 = (Distance between Temp_Loc_1 and Temp_Loc_2)
-
-









Else - Actions
-










Hashtable - Save Temp_Real_3 as (Key speed.) of (Key (Picked unit).) in EC_Hash.
-










Set VariableSet Temp_Real_4 = 5000.00
-
-
-








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









If - Conditions
-










Temp_Real_3 Less than EC_Reals[5]
-
-









Then - Actions
-










Hashtable - Save Temp_Real_3 as (Key speed.) of (Key (Picked unit).) in EC_Hash.
-
-









Else - Actions
-
-








Hashtable - Save (Temp_Real_1 + Temp_Real_4) as (Key distance.) of (Key (Picked unit).) in EC_Hash.
-








-------- -------------------- --------
-








Set VariableSet Temp_Real_3 = (Load (Key damage.) of (Key (Picked unit).) from EC_Hash.)
-








-------- -------------------- --------
-








Set VariableSet Temp_Group_1 = (Units within EC_Reals[4] of Temp_Loc_2 matching ((((Matching unit) is alive) Equal to True) and (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in Knockback_Group.) Equal to False)) and ((((Matching unit) is Magic Immune) Equal t
-








Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
-









Loop - Actions
-










Set VariableSet Temp_Real_1 = (Facing of Temp_Unit_1)
-










Set VariableSet Temp_Unit_2 = (Picked unit)
-










Set VariableSet Temp_Loc_3 = (Position of Temp_Unit_2)
-










-------- -------------------- --------
-










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











If - Conditions
-












(Cos((Temp_Real_1 - (Angle from Temp_Loc_2 to Temp_Loc_3)))) Greater than (Cos(90.00))
-
-











Then - Actions
-












Set VariableSet Temp_Real_1 = (Temp_Real_1 - 90.00)
-












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













If - Conditions
-














(Cos((Temp_Real_1 - (Angle from Temp_Loc_2 to Temp_Loc_3)))) Greater than (Cos(90.00))
-
-













Then - Actions
-














Set VariableSet Temp_Real_4 = -30.00
-
-













Else - Actions
-














Set VariableSet Temp_Real_4 = 30.00
-
-
-












Special Effect - Create a special effect attached to the chest of Temp_Unit_2 using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
-












Special Effect - Destroy (Last created special effect)
-












Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Tornado\Tornado_Target.mdl
-












-------- -------------------- --------
-












Unit - Cause Temp_Unit_1 to damage Temp_Unit_2, dealing Temp_Real_3 damage of attack type Spells and damage type Magic
-












-------- -------------------- --------
-












Hashtable - Save 1.00 as (Key loop.) of (Key (Picked unit).) in Knockback_Hash.
-












Hashtable - Save EC_Reals[5] as (Key speed.) of (Key (Picked unit).) in Knockback_Hash.
-












Hashtable - Save Handle Of(Last created special effect) as (Key effect_1.) of (Key (Picked unit).) in Knockback_Hash.
-












Hashtable - Save ((Angle from Temp_Loc_1 to Temp_Loc_2) + Temp_Real_4) as (Key angle.) of (Key (Picked unit).) in Knockback_Hash.
-












-------- -------------------- --------
-












Unit Group - Add Temp_Unit_2 to Knockback_Group
-












-------- -------------------- --------
-












Custom script: call RemoveLocation(udg_Temp_Loc_3)
-
-











Else - Actions
-
-
-
-








Trigger - Turn on Knockback <gen>
-








Custom script: call DestroyGroup(udg_Temp_Group_1)
-








Custom script: call RemoveLocation(udg_Temp_Loc_1)
-








Custom script: call RemoveLocation(udg_Temp_Loc_2)
-
-







Else - Actions
-








Special Effect - Destroy (Load (Key effect_1.) of (Key (Picked unit).) in EC_Hash.)
-








Special Effect - Destroy (Load (Key effect_2.) of (Key (Picked unit).) in EC_Hash.)
-








Special Effect - Destroy (Load (Key effect_3.) of (Key (Picked unit).) in EC_Hash.)
-








Special Effect - Destroy (Load (Key effect_4.) of (Key (Picked unit).) in EC_Hash.)
-








-------- -------------------- --------
-








Unit - Turn collision for Temp_Unit_1 On.
-








-------- -------------------- --------
-








Unit Group - Remove Temp_Unit_1 from EC_Group.
-








-------- -------------------- --------
-








Hashtable - Clear all child hashtables of child (Key (Picked unit).) in EC_Hash.
-








-------- -------------------- --------
-








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









If - Conditions
-










(EC_Group is empty) Equal to True
-
-









Then - Actions
-










Trigger - Turn off (This trigger)
-
-









Else - Actions
-
-
-
-
-
-
-



Else - Actions
-
-
-
-
Reverse Polarity
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Reverse Polarity
-
-

Actions
-


Set VariableSet TempUnit = (Triggering unit)
-


Set VariableSet TempLoc = (Position of TempUnit)
-


Set VariableSet TempReal = (0.00 + (50.00 x (Real((Level of Reverse Polarity for TempUnit)))))
-


Set VariableSet TempReal2 = (Facing of TempUnit)
-


Set VariableSet RPGroup = (Units within 350.00 of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit).) Equal to True))).)
-


Unit Group - Pick every unit in RPGroup and do (Actions)
-



Loop - Actions
-




Set VariableSet TempUnit2 = (Picked unit)
-




Unit - Turn collision for TempUnit2 Off.
-




Set VariableSet TempLoc2 = (TempLoc offset by (Random real number between 120.00 and 170.00) towards TempReal2 degrees.)
-




Unit - Move TempUnit2 instantly to TempLoc2
-




Unit - Cause TempUnit to damage TempUnit2, dealing TempReal damage of attack type Spells and damage type Normal
-




Custom script: call RemoveLocation( udg_TempLoc2 )
-
-
-


Countdown Timer - Start RPTime as a One-shot timer that will expire in 0.00 seconds
-


Custom script: call RemoveLocation( udg_TempLoc )
-
-
-
Reverse Polarity off
-

Events
-


Time - RPTime expires
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in RPGroup and do (Actions)
-



Loop - Actions
-




Unit - Turn collision for (Picked unit) On.
-
-
-


Custom script: call DestroyGroup( udg_RPGroup )
-
-
-
Pwning Notice CHANGED
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


((Triggering unit) is A Hero) Equal to True
-


((Triggering unit) is An Ancient) Not equal to True
-


((Triggering unit) is an illusion) Not equal to True
-
-

Actions
-


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



If - Conditions
-




(Owner of (Killing unit)) Equal to Neutral Hostile
-
-



Then - Actions
-




Game - Display to (All players) the text: (|cFF000000Neutral Creeps|r + ( has just killed + ((ColorCodes[TempInt1] + ((Name of (Owner of (Triggering unit))) + |r)) + .)))
-




Set VariableSet unit = (Triggering unit)
-




Set VariableSet unit2 = (Killing unit)
-




Custom script: set udg_integer = GetHandleIdBJ( udg_unit )
-




Hashtable - Clear all child hashtables of child integer in HASHASSIST.
-
-



Else - Actions
-




Set VariableSet TempInt1 = (Player number of (Owner of (Triggering unit)))
-




Set VariableSet TempInt2 = (Player number of (Owner of (Killing unit)))
-




Set VariableSet PlayerConcecutiveDeath[TempInt1] = (PlayerConcecutiveDeath[TempInt1] + 1)
-




Set VariableSet PlayerConcecutiveDeath[TempInt2] = 0
-




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





If - Conditions
-






PlayerConcecutiveDeath[TempInt1] Less than or equal to 2
-
-





Then - Actions
-






Set VariableSet Reward = 300
-
-





Else - Actions
-






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







If - Conditions
-








PlayerConcecutiveDeath[TempInt1] Equal to 3
-
-







Then - Actions
-








Set VariableSet Reward = 200
-
-







Else - Actions
-








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









If - Conditions
-










PlayerConcecutiveDeath[TempInt1] Equal to 4
-
-









Then - Actions
-










Set VariableSet Reward = 150
-
-









Else - Actions
-










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











If - Conditions
-












PlayerConcecutiveDeath[TempInt1] Greater than or equal to 5
-
-











Then - Actions
-












Set VariableSet Reward = 100
-
-











Else - Actions
-
-
-
-
-
-
-
-




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





If - Conditions
-






Or - Any (Conditions) are true
-







Conditions
-








(Owner of (Killing unit)) Equal to Player 10 (Light Blue)
-








(Owner of (Killing unit)) Equal to Player 12 (Brown)
-
-
-
-





Then - Actions
-






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







If - Conditions
-








(Owner of (Killing unit)) Equal to Player 12 (Brown)
-
-







Then - Actions
-








Game - Display to (All players) the text: ((The |cffFF0000 + (Evil + |r)) + ( forces has just killed + ((ColorCodes[TempInt1] + ((Name of (Owner of (Triggering unit))) + |r)) + .)))
-
-







Else - Actions
-
-






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







If - Conditions
-








(Owner of (Killing unit)) Equal to Player 10 (Light Blue)
-
-







Then - Actions
-








Game - Display to (All players) the text: ((The |cff0080FF + (Good + |r)) + ( forces has just killed + ((ColorCodes[TempInt1] + ((Name of (Owner of (Triggering unit))) + |r)) + .)))
-
-







Else - Actions
-
-
-





Else - Actions
-






Game - Display to (All players) the text: ((ColorCodes[TempInt2] + ((Name of (Owner of (Killing unit))) + |r)) + ( has just killed + ((ColorCodes[TempInt1] + ((Name of (Owner of (Triggering unit))) + |r)) + ( and gains + ((String(Reward)) + gold.)))))
-
-
-




Set VariableSet unit = (Triggering unit)
-




Set VariableSet unit2 = (Killing unit)
-




Custom script: set udg_integer = GetHandleIdBJ( udg_unit )
-




Custom script: set udg_integer2 = GetHandleIdBJ( udg_unit2 )
-




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





If - Conditions
-






(unit belongs to an enemy of (Owner of unit2).) Equal to True
-
-





Then - Actions
-






Set VariableSet player = (Owner of unit2)
-






Set VariableSet integer3 = 0
-






Trigger - Run REWARD FOR KILL <gen> (checking conditions)
-






Set VariableSet string2 = Assist:
-






For each (Integer LOOP) from 1 to 12, do (Actions)
-







Loop - Actions
-








Set VariableSet player = (Player(LOOP))
-








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









If - Conditions
-










(player is in player_force.) Not equal to True
-










player Not equal to (Owner of unit)
-










player Not equal to (Owner of (Killing unit))
-
-









Then - Actions
-










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











If - Conditions
-












(unit belongs to an enemy of player.) Equal to True
-












(Load LOOP of integer from HASHASSIST.) Greater than 0
-
-











Then - Actions
-












Set VariableSet integer3 = (integer3 + 1)
-












Player Group - Add player to player_force
-












Set VariableSet string2 = (string2 + ColorCodes[(Player number of player)])
-












Set VariableSet string2 = (string2 + ((Name of player) + |r, ))
-
-











Else - Actions
-
-










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











If - Conditions
-












(unit2 belongs to an enemy of player.) Not equal to True
-












(Load LOOP of integer2 from HASHASSIST.) Greater than 0
-
-











Then - Actions
-












Set VariableSet integer3 = (integer3 + 1)
-












Player Group - Add player to player_force
-












Set VariableSet string2 = (string2 + ColorCodes[(Player number of player)])
-












Set VariableSet string2 = (string2 + ((Name of player) + |r, ))
-
-











Else - Actions
-
-
-









Else - Actions
-
-
-
-






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







If - Conditions
-








integer3 Greater than 0
-
-







Then - Actions
-








Game - Display to (All players) the text: string2
-








Trigger - Run REWARD FOR ASSIST <gen> (checking conditions)
-
-







Else - Actions
-
-
-





Else - Actions
-
-




Hashtable - Clear all child hashtables of child integer in HASHASSIST.
-




Set VariableSet unit = No unit
-




Set VariableSet unit2 = No unit
-
-
-
-
