- Joined
- Jul 19, 2007
- Messages
- 973
Hi again. Got problem with an ability I imported into my map and it works perfect in the spellpack but not in my map. For some reason the attacking Hero only attacks the target unit once but it's meant to attack for about 6-9 times depending on what level of the ability.
-
Killing Frenzy
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Killing Frenzy
-
-

Actions
-


-------- Setting the caster and target, don't modify this --------
-


Set VariableSet KF_caster = (Triggering unit)
-


Set VariableSet KF_target = (Target unit of ability being cast)
-


-------- 1) If you're not interested in modifying the spell mechanics, edit the following strings only --------
-


-------- Setting the number of attacks --------
-


Set VariableSet KF_noa = ((Level of Killing Frenzy for KF_caster) + 6)
-


-------- Setting the damage dealt on a 'normal' attack --------
-


Set VariableSet KF_A_damage = (15.00 x (Real((Level of Killing Frenzy for KF_caster))))
-


-------- Setting the damage dealt on the slam attack --------
-


Set VariableSet KF_B_damage = (50.00 x (Real((Level of Killing Frenzy for KF_caster))))
-


-------- Setting the range of the slam --------
-


Set VariableSet KF_slam_range = 350.00
-


-------- 2) Setting the caster --------
-


-------- Pausing the target --------
-


Unit - Pause KF_target
-


-------- Storing the target position into the variable --------
-


Set VariableSet KF_point = (Position of KF_target)
-


-------- Creating the special effect attached to the weapon and setting the SE variable --------
-


Special Effect - Create a special effect attached to the weapon of KF_caster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
-


Set VariableSet KF_se = (Last created special effect)
-


Wait 0.01 game-time seconds
-


-------- Pausing the caster --------
-


Unit - Pause KF_caster
-


-------- Making the caster invulnerable --------
-


Unit - Make KF_caster Invulnerable
-


-------- Turning the caster to the target, just to avoid attacking air --------
-


Unit - Make KF_caster face KF_target over 0.00 seconds
-


-------- Increasing the casters anim speed (for faster attacking) --------
-


Animation - Change KF_caster's animation speed to 300.00% of its original speed
-


-------- 3) Running the attacks --------
-


-------- The actual attacking (the number of integers represents the number of attacks) --------
-


For each (Integer A) from 1 to KF_noa, do (Actions)
-



Loop - Actions
-




Wait 0.15 seconds
-




-------- To look like he's attacking --------
-




Animation - Play KF_caster's attack animation
-




-------- The damage dealt to the target --------
-




Unit - Cause KF_caster to damage KF_target, dealing KF_A_damage damage of attack type Spells and damage type Normal
-




-------- a) Checks after every attack if the target is killed and if it is, deals slam damage to neighbouring units --------
-




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





If - Conditions
-






(KF_target is dead) Equal to True
-
-





Then - Actions
-






-------- Setting the range of the slam and which units are damaged --------
-






Set VariableSet KF_boom = (Units within KF_slam_range of (Position of KF_target) matching (((Matching unit) belongs to an enemy of (Owner of KF_caster).) Equal to True).)
-






-------- Slam special effect --------
-






Special Effect - Create a special effect at (Position of KF_target) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
-






Special Effect - Destroy (Last created special effect)
-






-------- Damaging and knocking back every unit in group KF_boom --------
-






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







Loop - Actions
-








Animation - Play KF_caster's attack animation
-








Unit - Cause KF_caster to damage (Picked unit), dealing KF_B_damage damage of attack type Spells and damage type Normal
-








-------- Setting the knockback parameters, for more info see the GUI Knockback System --------
-








Set VariableSet KBA_Caster = (Triggering unit)
-








Set VariableSet KBA_TargetUnit = (Picked unit)
-








Set VariableSet KBA_Level = (Level of (Ability being cast) for (Triggering unit))
-








Set VariableSet KBA_StartingPosition = (Position of (Triggering unit))
-








Set VariableSet KBA_Speed = 5.00
-








Set VariableSet KBA_DistancePerLevel = 150.00
-








Set VariableSet KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-








Set VariableSet KBA_SpecialEffects[2] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-








Set VariableSet KBA_DestroyTrees = False
-








-------- Running the knockback trigger --------
-








Trigger - Run Cast A Knockback Copy <gen> (checking conditions)
-
-
-
-





Else - Actions
-
-




-------- Removing Leaks --------
-




Custom script: call RemoveLocation(udg_KF_point)
-




Custom script: call DestroyGroup(udg_KF_boom)
-




-------- b) This will run after the slam attack --------
-




-------- Restoring the normal anim speed, caster size, unpausing the caster --------
-




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





If - Conditions
-






(KF_target is dead) Equal to True
-
-





Then - Actions
-






Wait 0.20 seconds
-






-------- 4) Ending the trigger --------
-






-------- Destroying the effect attached to the weapon --------
-






Special Effect - Destroy KF_se
-






-------- Restoring the normal anim speed --------
-






Animation - Change KF_caster's animation speed to 100.00% of its original speed
-






-------- Making the caster vulnerable --------
-






Unit - Make KF_caster Vulnerable
-






-------- Unpausing the caster --------
-






Unit - Unpause KF_caster
-






-------- It skips the rest of the trigger actions (duh) --------
-






Skip remaining actions
-
-





Else - Actions
-
-
-
-


-------- The knockback of the target unit (the target is not dead) --------
-


-------- Setting the knockback parameters, for more info see the GUI Knockback System --------
-


Set VariableSet KBA_Caster = KF_caster
-


Set VariableSet KBA_TargetUnit = KF_target
-


Set VariableSet KBA_StartingPosition = (Position of (Triggering unit))
-


Set VariableSet KBA_Level = (Level of (Ability being cast) for (Triggering unit))
-


Set VariableSet KBA_Speed = 11.00
-


Set VariableSet KBA_DistancePerLevel = 250.00
-


Set VariableSet KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-


Set VariableSet KBA_SpecialEffects[2] = Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
-


Set VariableSet KBA_DestroyTrees = False
-


-------- The knockback attack --------
-


Animation - Play KF_caster's attack animation
-


Unit - Cause KF_caster to damage KF_target, dealing KF_A_damage damage of attack type Spells and damage type Normal
-


-------- 4) Ending the trigger --------
-


-------- Restoring the normal anim speed --------
-


Animation - Change KF_caster's animation speed to 100.00% of its original speed
-


-------- Destroying the effect attached to the weapon --------
-


Special Effect - Destroy KF_se
-


-------- Unpausing the target --------
-


Unit - Unpause KF_target
-


-------- Running the knockback trigger --------
-


Trigger - Run Cast A Knockback Copy <gen> (checking conditions)
-


Wait 0.20 seconds
-


-------- Making the caster vulnerable --------
-


Unit - Make KF_caster Vulnerable
-


-------- Unpausing the caster --------
-


Unit - Unpause KF_caster
-
-
