- Joined
- Apr 1, 2010
- Messages
- 289
-
ChargeLoop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer CM) from 1 to ChargeMax, do (Actions)
-
Loop - Actions
- Game - Display to (All players) the text: is casting
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ChargeCaster[CM] is alive) Equal to True
- (Current order of ChargeCaster[CM]) Equal to (Order(stampede))
-
Then - Actions
- Set Integer1 = (Random integer number between 1 and 100)
- Set Loc_to_remove2 = (Position of ChargeCaster[CM])
- Set zzangle = (Facing of ChargeCaster[CM])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Integer1 Less than or equal to ChargeSpawn[CM]
-
Then - Actions
- Set Real1 = (Random real number between (zzangle + 100.00) and (zzangle + 260.00))
- Set Loc_to_remove = (Loc_to_remove2 offset by 570.00 towards Real1 degrees)
- Unit - Create 1 Chivalric Knight for ChargePlayer[CM] at Loc_to_remove facing zzangle degrees
- Unit Group - Add (Last created unit) to ChargeGroup[CM]
- Animation - Play (Last created unit)'s walk animation
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in ChargeGroup[CM] and do (Actions)
-
Loop - Actions
- Set Unit1 = (Picked unit)
- Set Loc_to_remove = (Position of Unit1)
- Set TempPoint = (Loc_to_remove offset by 20.00 towards zzangle degrees)
- Custom script: call SetUnitX(udg_Unit1,GetLocationX(udg_TempPoint))
- Custom script: call SetUnitY(udg_Unit1,GetLocationY(udg_TempPoint))
- Custom script: call RemoveLocation(udg_Loc_to_remove)
- Set Loc_to_remove = (Loc_to_remove offset by 2.00 towards zzangle degrees)
- Set Loc_to_remove3 = (Loc_to_remove offset by -2.00 towards zzangle degrees)
- Set Real2 = (Distance between Loc_to_remove and TempPoint)
- Set Real2 = (Real2 / (Distance between Loc_to_remove3 and TempPoint))
- Set Real2 = (Real2 x 0.50)
- Set Real3 = (Distance between Loc_to_remove2 and TempPoint)
- Set Real1 = (Abs((Real2 / Real3)))
- Set Real1 = (Real1 x 100.00)
- Custom script: call RemoveLocation(udg_Loc_to_remove3)
- Custom script: call RemoveLocation(udg_Loc_to_remove)
- Animation - Change Unit1's vertex coloring to (100.00%, 100.00%, 100.00%) with Real1% transparency
- Set Group1 = (Units within 78.00 of TempPoint 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 ChargePlayer[CM]) Equal to True))))
-
For each (Integer A) from 1 to (Number of units in Group1), do (Actions)
-
Loop - Actions
- Set Unit2 = (Random unit from Group1)
- Unit Group - Remove Unit2 from Group1
- Set Loc_to_remove = (Position of Unit2)
- Set zzangle = (Angle from TempPoint to Loc_to_remove)
- Set Loc_to_remove3 = (Loc_to_remove offset by 20.00 towards zzangle degrees)
- Unit - Cause ChargeCaster[CM] to damage Unit2, dealing (ChargeDamage[CM] x Real1) damage of attack type Siege and damage type Normal
- Unit - Move Unit2 instantly to Loc_to_remove3
- Special Effect - Create a special effect attached to the chest of Unit2 using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_Loc_to_remove3)
- Custom script: call RemoveLocation(udg_Loc_to_remove)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_Group1)
- Set Group1 = (Units within 600.00 of Loc_to_remove2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit1 is in Group1) Equal to False
-
Then - Actions
- Unit - Remove Unit1 from the game
- Special Effect - Create a special effect at TempPoint using Units\NightElf\Wisp\WispExplode.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_Group1)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_Loc_to_remove2)
-
Else - Actions
-
Unit Group - Pick every unit in ChargeGroup[CM] and do (Actions)
-
Loop - Actions
- Set Unit1 = (Picked unit)
- Set Loc_to_remove = (Position of Unit1)
- Unit - Remove Unit1 from the game
- Special Effect - Create a special effect at Loc_to_remove using Units\NightElf\Wisp\WispExplode.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_ChargeGroup[udg_CM])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TM Equal to TacticsMax
-
Then - Actions
- Set TacticsMax = (TacticsMax - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TacticsMax Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in ChargeGroup[CM] and do (Actions)
-
If - Conditions
-
Loop - Actions
-
For each (Integer CM) from 1 to ChargeMax, do (Actions)
-
Events
-
ChargeCast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Charge!!
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ChargeMax Equal to 0
-
Then - Actions
- Trigger - Turn on ChargeLoop <gen>
- Else - Actions
-
If - Conditions
- Set ChargeMax = (ChargeMax + 1)
- Set ChargeCaster[ChargeMax] = (Triggering unit)
- Set ChargePlayer[ChargeMax] = (Triggering player)
- Set Integer1 = (Level of Charge!! for ChargeCaster[ChargeMax])
- Set ChargeDamage[ChargeMax] = ((5.00 x (Real(Integer1))) + 15.00)
- Set ChargeSpawn[ChargeMax] = ((2 x Integer1) + 2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit1 is in Group1) Equal to False
-
Then - Actions
- Unit - Remove Unit1 from the game
- Special Effect - Create a special effect at TempPoint using Units\NightElf\Wisp\WispExplode.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions