- Joined
- Oct 30, 2007
- Messages
- 91
Well i am trying to make a charge spell mui but i don't know how, here's my script. The spell is broken up into 2 triggers, i know that is bad but 1 is when the spell is casted the other is the charge moving loop. The loop trigger is originally off. PLZ HELP =(

-
BEGIN CAST
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to [Z] Berserker Slash
-
-
Actions
-
-------- Sets the Casting unit, perpares the casting unit for charge! >:) --------
-
Set Temp_Caster = (Casting unit)
-
Set Temp_Point = (Target point of ability being cast)
-
-------- - --------
-
-------- - --------
-
-------- Turn's off the BM collision so he wont get stuck --------
-
Unit - Turn collision for Temp_Caster Off
-
-------- - --------
-
-------- - --------
-
-------- FX to make it look COOL --------
-
Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the chest of Temp_Caster using Abilities\Weapons\SludgeMissile\SludgeMissile.mdl
-
Set Temp_FX = (Last created special effect)
-
Sound - Play HeroBladeMasterYesAttack3 <gen> at 100.00% volume, attached to Temp_Caster
-
-------- - --------
-
-------- - --------
-
-------- Makes the BM stick out his sword --------
-
Animation - Play (Casting unit)'s attack,second animation
-
-------- - --------
-
-------- - --------
-
-------- Turns on the moving charge part. --------
-
Trigger - Turn on BERSERK MOVE <gen>
-
-------- - --------
-
-------- - --------
-
-
-
BERSERK MOVE
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
-------- Sets the base of movement. --------
-
Set Temp_Charge_Point_1 = (Position of Temp_Caster)
-
-------- - --------
-
-------- - --------
-
-------- Sets new place, point based on postition of hero. --------
-
Set Temp_Charge_Point_2 = (Temp_Charge_Point_1 offset by 75.00 towards (Angle from Temp_Charge_Point_1 to Temp_Point) degrees)
-
-------- - --------
-
-------- - --------
-
-------- Sets new place for impaled units. --------
-
Set Temp_Charge_Point_3 = (Temp_Charge_Point_2 offset by 80.00 towards (Angle from Temp_Charge_Point_1 to Temp_Point) degrees)
-
-------- - --------
-
-------- - --------
-
-------- Moves hero to new position. --------
-
Unit - Move Temp_Caster instantly to Temp_Charge_Point_2
-
-------- - --------
-
-------- - --------
-
-------- Moves damaged units to get impaled. --------
-
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
-
Loop - Actions
-
Unit - Turn collision for (Picked unit) Off
-
Unit - Move (Picked unit) instantly to Temp_Charge_Point_3
-
-------- Moves impaled unit with you. --------
-
-
-
-------- - --------
-
-------- - --------
-
-------- Measures the distance between points, used later --------
-
Set Charge_Distance = (Distance between Temp_Charge_Point_1 and Temp_Point)
-
-------- - --------
-
-------- - --------
-
-------- Creates the after image. --------
-
Unit - Create 1 DUMMY BM for (Owner of Temp_Caster) at Temp_Charge_Point_2 facing (Facing of Temp_Caster) degrees
-
Animation - Change (Last created unit)'s animation speed to 0.00% of its original speed
-
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 60.00% transparency
-
-------- - --------
-
-------- - --------
-
-------- Creates the image. --------
-
Special Effect - Create a special effect at Temp_Charge_Point_2 using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at Temp_Charge_Point_3 using Abilities\Spells\Undead\Impale\ImpaleMissTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at Temp_Charge_Point_3 using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- - --------
-
-------- - --------
-
-------- Adds the unit to the temp group, going to be destroyed later. --------
-
Set Temp_Group = (Units owned by (Owner of Temp_Caster) of type DUMMY BM)
-
-------- - --------
-
-------- - --------
-
-------- Level one of the slash --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of [Z] Berserker Slash for Temp_Caster) Equal to 1
-
-
Then - Actions
-
Set Temp_Group_2 = (Units within 75.00 of (Position of Temp_Caster) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of Temp_Caster)) Equal to True)))
-
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
-
Loop - Actions
-
Unit - Cause Temp_Caster to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
-
-------- HERO DAMAGES THEM! --------
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- Some FX --------
-
Unit Group - Add (Picked unit) to Temp_Group_2
-
-------- Adds unit to impaled group. --------
-
-
-
-
Else - Actions
-
-
-------- - --------
-
-------- - --------
-
-------- Level two of the slash --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of [Z] Berserker Slash for Temp_Caster) Equal to 2
-
-
Then - Actions
-
Set Temp_Group_2 = (Units within 75.00 of (Position of Temp_Caster) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of Temp_Caster)) Equal to True)))
-
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
-
Loop - Actions
-
Unit - Cause Temp_Caster to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Normal
-
-------- HERO DAMAGES THEM! --------
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- Some FX --------
-
Unit Group - Add (Picked unit) to Temp_Group_2
-
-------- Adds unit to impaled group. --------
-
-
-
-
Else - Actions
-
-
-------- - --------
-
-------- - --------
-
-------- Level three of the slash --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of [Z] Berserker Slash for Temp_Caster) Equal to 3
-
-
Then - Actions
-
Set Temp_Group_2 = (Units within 75.00 of (Position of Temp_Caster) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of Temp_Caster)) Equal to True)))
-
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
-
Loop - Actions
-
Unit - Cause Temp_Caster to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Normal
-
-------- HERO DAMAGES THEM! --------
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- Some FX --------
-
Unit Group - Add (Picked unit) to Temp_Group_2
-
-------- Adds unit to impaled group. --------
-
-
-
-
Else - Actions
-
-
-------- - --------
-
-------- - --------
-
-------- How the movement stops, uses the distance from the variable that gets it and finds out when to stop. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Charge_Distance Less than or equal to 100.00
-
-
Then - Actions
-
-------- Turns hero's collision on. --------
-
Unit - Turn collision for Temp_Caster On
-
Trigger - Turn off (This trigger)
-
-------- Destroys afterimages. --------
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
-------- Turns impaled unit's collision and removes them from being impaled. --------
-
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
-
Loop - Actions
-
Unit - Turn collision for (Picked unit) On
-
Unit Group - Remove (Picked unit) from Temp_Group_2
-
-
-
-------- Destroys one of the fx --------
-
Special Effect - Destroy Temp_FX
-
Custom script: call RemoveLocation (udg_Temp_Point)
-
Custom script: call DestroyGroup (udg_Temp_Group_2)
-
-
Else - Actions
-
Custom script: call DestroyGroup (udg_Temp_Group)
-
Custom script: call RemoveLocation (udg_Temp_Charge_Point_1)
-
Custom script: call RemoveLocation (udg_Temp_Charge_Point_2)
-
Custom script: call RemoveLocation (udg_Temp_Charge_Point_3)
-
-
-
-
