- Joined
- Jan 5, 2012
- Messages
- 116
I made a custom ability for a hero and every time I cast it causes huge fps drops. I originally made it in a clean map and everything worked fine, no lag at all. But when I passed it over to my map it causes that lag. What could be causing it?
-
Explosive Ammo
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Explosive Ammo
-
-

Actions
-


-------- Basic setup --------
-


Set VariableSet ER_Caster = (Triggering unit)
-


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


Set VariableSet ER_Owner = (Owner of ER_Caster)
-


Set VariableSet ER_Level = (Level of Explosive Ammo for ER_Caster)
-


-------- Setting the aoe, main damage and burn duration --------
-


Set VariableSet ER_Range = 200.00
-


Set VariableSet ER_Damage = (25.00 x (Real(ER_Level)))
-


Set VariableSet ER_Burn_Duration = 5.00
-


-------- Damage group --------
-


Set VariableSet ER_Group = (Units within ER_Range of ER_Point matching ((((Matching unit) belongs to an enemy of ER_Owner.) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True))).)
-


-------- Dealing the damage --------
-


Custom script: set bj_wantDestroyGroup = true
-


Unit Group - Pick every unit in ER_Group and do (Unit - Cause ER_Caster to damage (Picked unit), dealing ER_Damage damage of attack type Spells and damage type Normal)
-


-------- Creating dummy unit and casting the ability --------
-


Unit - Create 1 Dummy(Explosive Ammo) for ER_Owner at ER_Point facing Default building facing degrees
-


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


Unit - Add Explosive Ammo(dummy) to (Last created unit)
-


Unit - Set level of Explosive Ammo(dummy) for (Last created unit) to ER_Level
-


Unit - Order (Last created unit) to Night Elf Demon Hunter - Activate Immolation.
-


-------- Setting the special effect --------
-


Special Effect - Create a special effect at ER_Point using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
-


Special Effect - Destroy (Last created special effect)
-


Special Effect - Create a special effect at ER_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
-


Special Effect - Destroy (Last created special effect)
-


-------- Clearing leak --------
-


Custom script: call RemoveLocation(udg_ER_Point)
-
-




