- Joined
- Apr 18, 2010
- Messages
- 102
Hi, there seems to be a problem with the 2nd Cast of this Ability. When 2 Units cast it the same time, one of them doesnt move and attack his corresponding target. The spell tooltip is kinda like this: Caster throws swords to target direction, when it hits a target, the caster is then able to cast the 2nd stage of this ability which makes him rush to that target and attack it.
Here are the triggers:
Crane Wings Throw
Crane Wings Throw Loop
Crane Wings Charge Loop
Crane Wings Charge Loop
I test the MUI-bility of the trigger by automatically ordering another copy of the unit to cast the same ability.. Also if someone can tell me an easier way of doing this, IE getting the target unit from the first spell to be used in the 2nd spell, Id appreciate that much =D. Also theres still a third activation for this spell.
Some Explantion for the Variables
CW#_SkillDuration - is the seconds of availabilty of the next spell..
BTW the whole point of increasing that whenever the next spell is casted is to keep that ability, since the next spell is channelled. Really trying to not rely on Pauses =D
Here are the triggers:
Crane Wings Throw
-
Crane Wings Throw
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Crane Wings
-
-
Actions
-
-------- Indexing Start --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW1_MUI_1 Equal to 0
-
-
Then - Actions
-
-------- If there are currently no instances running, we turn on the loop. --------
-
Trigger - Turn on Crane Wings Throw Loop <gen>
-
-
Else - Actions
-
-
-------- Increases the indexes --------
-
Set CW1_MUI_1 = (CW1_MUI_1 + 1)
-
-------- Start of Dynamic Indexing --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW1_MUI_1 Greater than CW1_Max_Index
-
-
Then - Actions
-
-------- Indexing ~ ~ --------
-
Set CW1_MUI_2[CW1_MUI_1] = CW1_MUI_1
-
Set CW1_Max_Index = CW1_MUI_1
-
-
Else - Actions
-
-
-------- End of Dynamic Indexing --------
-
-------- Makes it easier and cleaner. --------
-
Set Temp = CW1_MUI_2[CW1_MUI_1]
-
-------- The MUI boolean --------
-
-------- Setting Caster --------
-
Set CW1_Caster[Temp] = (Triggering unit)
-
-------- Setting Player --------
-
Set CW1_Player[Temp] = (Owner of CW1_Caster[Temp])
-
-------- * * *Here you can change the Distance* * * --------
-
Set CW1_Distance = 500.00
-
-------- * * *Here you can change the Damage* * * --------
-
Set CW1_Damage[Temp] = (1.00 x (Real((Agility of CW1_Caster[Temp] (Include bonuses)))))
-
-------- Setting the Boolean False --------
-
Set CW1_Boolean[Temp] = False
-
-------- Setting Speed --------
-
Set CW1_Speed = (CW1_Distance / 16.00)
-
-------- Setting Traveled Distance --------
-
Set CW1_Traveled[Temp] = 0.00
-
-------- Setting Caster Location --------
-
Set CasterLoc = (Position of CW1_Caster[Temp])
-
-------- Setting Target Location --------
-
Set TargetLoc = (Target point of ability being cast)
-
-------- Setting Angle --------
-
Set CW1_Angle[Temp] = (Angle from CasterLoc to TargetLoc)
-
-------- Setting Dummy Location --------
-
Set DummyLoc = (CasterLoc offset by 25.00 towards CW1_Angle[Temp] degrees)
-
-------- Creating Dummy --------
-
Unit - Create 1 Crane Wings Dummy for CW1_Player[Temp] at DummyLoc facing CW1_Angle[Temp] degrees
-
Animation - Play (Last created unit)'s Spell Channel Two animation
-
-------- Setting Dummy --------
-
Set CW1_Dummy[Temp] = (Last created unit)
-
-------- * * *Here you can change the Animation speed of the Swords* * * --------
-
Animation - Change CW1_Dummy[Temp]'s animation speed to 175.00% of its original speed
-
-------- Creating Eye Candy for Swords --------
-
Special Effect - Create a special effect attached to the left hand of CW1_Dummy[Temp] using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
-
Set CW1_EyeCandy1[Temp] = (Last created special effect)
-
Special Effect - Create a special effect attached to the right hand of CW1_Dummy[Temp] using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
-
Set CW1_EyeCandy2[Temp] = (Last created special effect)
-
-------- Removing Leaks --------
-
Custom script: call RemoveLocation(udg_CasterLoc)
-
Custom script: call RemoveLocation(udg_TargetLoc)
-
Custom script: call RemoveLocation(udg_DummyLoc)
-
-
-
Crane Wings Throw Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer CW1_MUI_3) from 1 to CW1_MUI_1, do (Actions)
-
Loop - Actions
-
-------- Makes it easier to read and cleaner --------
-
Set Temp = CW1_MUI_2[CW1_MUI_3]
-
-------- Checks if Swords have reached max range --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW1_Traveled[Temp] Less than CW1_Distance
-
-
Then - Actions
-
-------- Setting Locations --------
-
Set CasterLoc = (Position of CW1_Dummy[Temp])
-
Set TargetLoc = (CasterLoc offset by CW1_Speed towards CW1_Angle[Temp] degrees)
-
-------- Moving Swords --------
-
Unit - Move CW1_Dummy[Temp] instantly to TargetLoc
-
-------- Setting Traveled Distance --------
-
Set CW1_Traveled[Temp] = (CW1_Traveled[Temp] + CW1_Speed)
-
-------- Setting Target Group --------
-
Set Target_Group = (Units within (CW1_Speed x 2.00) of CasterLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of CW1_Player[Temp]) Equal to True)))
-
-------- Checks if there are targets available --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in Target_Group) Greater than 0
-
-
Then - Actions
-
-------- Setting Target --------
-
Set CW1_Target[Temp] = (Random unit from Target_Group)
-
-------- Damaging Target --------
-
Unit - Cause CW1_Caster[Temp] to damage CW1_Target[Temp], dealing CW1_Damage[Temp] damage of attack type Spells and damage type Normal
-
-------- Eye Candy --------
-
Special Effect - Create a special effect attached to the chest of CW1_Target[Temp] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- Setting Traveled Distance to Max --------
-
Set CW1_Traveled[Temp] = CW1_Distance
-
-------- Hiding Crane Wings Throw from Caster --------
-
Unit - Set level of Crane Wings for CW1_Caster[Temp] to 2
-
-------- Adding Crane Wings Charge to Caster --------
-
Unit - Add Crane Wings 2 to CW1_Caster[Temp]
-
-------- * * *Here you can Set the Duration of the Next Ability* * * --------
-
Set CW1_SkillDuration[Temp] = 1.00
-
-
Else - Actions
-
-
-------- Removing Leaks --------
-
Custom script: call RemoveLocation(udg_CasterLoc)
-
Custom script: call RemoveLocation(udg_TargetLoc)
-
Custom script: call DestroyGroup(udg_Target_Group)
-
-
Else - Actions
-
-------- Destroying Sword Eye Candies --------
-
Special Effect - Destroy CW1_EyeCandy1[Temp]
-
Special Effect - Destroy CW1_EyeCandy2[Temp]
-
-------- Removing the Swords --------
-
Unit - Add a 0.20 second Generic expiration timer to CW1_Dummy[Temp]
-
Animation - Change CW1_Dummy[Temp]'s animation speed to 0.00% of its original speed
-
-------- Checks if there is a target --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW1_SkillDuration[Temp] Greater than 0.00
-
-
Then - Actions
-
Set CW1_SkillDuration[Temp] = (CW1_SkillDuration[Temp] - 0.03)
-
-
Else - Actions
-
-------- Removing Crane Wings Charge from Caster --------
-
Unit - Remove Crane Wings 2 from CW1_Caster[Temp]
-
-------- Showing Crane Wings Throw from Caster --------
-
Unit - Set level of Crane Wings for CW1_Caster[Temp] to 1
-
-------- Recycling all the Indexes --------
-
Set CW1_MUI_2[CW1_MUI_3] = CW1_MUI_2[CW1_MUI_1]
-
Set CW1_MUI_2[CW1_MUI_1] = Temp
-
Set CW1_MUI_1 = (CW1_MUI_1 - 1)
-
Set CW1_MUI_3 = (CW1_MUI_3 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW1_MUI_1 Equal to 0
-
-
Then - Actions
-
-------- Turning off this trigger. Pointless to keep running --------
-
Trigger - Turn off (This trigger)
-
-------- -------------------------------------------------------- --------
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
Crane Wings Charge
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Crane Wings 2
-
-
Actions
-
-------- Indexing Start --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_MUI_1 Equal to 0
-
-
Then - Actions
-
-------- If there are currently no instances running, we turn on the loop. --------
-
Trigger - Turn on Crane Wings Charge Loop <gen>
-
-
Else - Actions
-
-
-------- Increases the indexes --------
-
Set CW2_MUI_1 = (CW2_MUI_1 + 1)
-
-------- Start of Dynamic Indexing --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_MUI_1 Greater than CW2_Max_Index
-
-
Then - Actions
-
-------- Indexing ~ ~ --------
-
Set CW2_MUI_2[CW2_MUI_1] = CW2_MUI_1
-
Set CW2_Max_Index = CW2_MUI_1
-
-
Else - Actions
-
-
-------- End of Dynamic Indexing --------
-
-------- Makes it easier and cleaner. --------
-
Set Temp = CW2_MUI_2[CW1_MUI_1]
-
-------- Setting Caster --------
-
Set CW2_Caster[Temp] = (Triggering unit)
-
-------- Finding Target --------
-
For each (Integer CW1_MUI_3) from 1 to CW1_MUI_1, do (Actions)
-
Loop - Actions
-
-------- Makes it easier to read and cleaner --------
-
Set Temp3 = CW1_MUI_2[CW1_MUI_3]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Caster[Temp] Equal to CW1_Caster[Temp3]
-
-
Then - Actions
-
-------- Setting Target --------
-
Set CW2_Target[Temp] = CW1_Target[Temp3]
-
-------- Setting Ability Duration --------
-
Set CW1_SkillDuration[Temp3] = 5.00
-
-
Else - Actions
-
-
-
-
-------- Making Caster face target --------
-
Unit - Make CW2_Caster[Temp] face CW2_Target[Temp] over 0.00 seconds
-
-------- * * *Here you can set the Damage* * * --------
-
Set CW2_Damage[Temp] = (1.00 x (Real((Agility of CW2_Caster[Temp] (Include bonuses)))))
-
-------- * * *Here you can set the Speed* * * --------
-
Set CW2_Speed = 30.00
-
-------- * * *Here you can set the Animation Speed of Caster* * * --------
-
Animation - Change CW2_Caster[Temp]'s animation speed to 225.00% of its original speed
-
-------- * * *Here you can set the Number of Attacks* * * --------
-
Set CW2_Attacks[Temp] = 2
-
-------- * * *Here you can set the Delay between the Damage and the Attack --------
-
Set CW2_Delay[Temp] = 0.20
-
-------- * * *Here you can set the Duration of the Ability* * * --------
-
Set CW2_SkillDuration[Temp] = 1.00
-
-
Crane Wings Charge Loop
-
Crane Wings Charge Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer CW2_MUI_3) from 1 to CW2_MUI_1, do (Actions)
-
Loop - Actions
-
-------- Makes it easier to read and cleaner --------
-
Set Temp = CW2_MUI_2[CW2_MUI_3]
-
-------- Checks if Caster is Alive and still channelling --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CW2_Caster[Temp] is alive) Equal to True
-
(CW2_Target[Temp] is alive) Equal to True
-
(Current order of CW2_Caster[Temp]) Equal to (Order(thunderclap))
-
-
Then - Actions
-
-------- Setting Locations of Caster and Target --------
-
Set CasterLoc = (Position of CW2_Caster[Temp])
-
Set TargetLoc = (Position of CW2_Target[Temp])
-
-------- Setting Angle --------
-
Set CW2_Angle = (Angle from CasterLoc to TargetLoc)
-
-------- Setting Distance --------
-
Set CW2_Distance = (Distance between CasterLoc and TargetLoc)
-
-------- Checking Distance of Points --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Distance Greater than 100.00
-
-
Then - Actions
-
-------- Making Caster Face Target --------
-
Unit - Make CW2_Caster[Temp] face CW2_Target[Temp] over 0.00 seconds
-
-------- Setting Location for Motion --------
-
Set DummyLoc = (CasterLoc offset by CW2_Speed towards CW2_Angle degrees)
-
-------- Moving Caster --------
-
Custom script: call SetUnitX(udg_CW2_Caster[udg_Temp], GetLocationX(udg_DummyLoc))
-
Custom script: call SetUnitY(udg_CW2_Caster[udg_Temp], GetLocationY(udg_DummyLoc))
-
-------- Removing Leaks --------
-
Custom script: call RemoveLocation(udg_DummyLoc)
-
-
Else - Actions
-
-------- Caster Attacks the Target --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Attacks[Temp] Greater than 0
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Delay[Temp] Equal to 0.20
-
-
Then - Actions
-
-------- Here you can set the Animation ID for the Attacks --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Attacks[Temp] Equal to 2
-
-
Then - Actions
-
Custom script: call SetUnitAnimationByIndex(udg_CW2_Caster[udg_Temp], 4)
-
-
Else - Actions
-
Custom script: call SetUnitAnimationByIndex(udg_CW2_Caster[udg_Temp], 5)
-
-
-
Set CW2_Delay[Temp] = (CW2_Delay[Temp] - 0.03)
-
-
Else - Actions
-
-------- Checking Delay for Damage --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_Delay[Temp] Greater than 0.00
-
-
Then - Actions
-
-------- Decreasing Delay --------
-
Set CW2_Delay[Temp] = (CW2_Delay[Temp] - 0.03)
-
-
Else - Actions
-
-------- Dealing Damage --------
-
Unit - Cause CW2_Caster[Temp] to damage CW2_Target[Temp], dealing CW2_Damage[Temp] damage of attack type Spells and damage type Normal
-
-------- Decreasing number of Attacks --------
-
Set CW2_Attacks[Temp] = (CW2_Attacks[Temp] - 1)
-
-------- Resetting Delay for Animation --------
-
Set CW2_Delay[Temp] = 0.20
-
-
-
-
-
-
Else - Actions
-
-------- Removing Crane Wings Charge Ability from Caster --------
-
Unit - Remove Crane Wings 2 from CW2_Caster[Temp]
-
-------- Adding Crane Wings Overedge to Caster --------
-
Unit - Add Crane Wings 3 to CW2_Caster[Temp]
-
-
-
-
-
-------- Removing Leaks --------
-
Custom script: call RemoveLocation(udg_CasterLoc)
-
Custom script: call RemoveLocation(udg_TargetLoc)
-
-
Else - Actions
-
-------- Reseting Caster's Animation Speed --------
-
Animation - Change CW2_Caster[Temp]'s animation speed to 100.00% of its original speed
-
-------- Checks whether Caster has Overedge Ability --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Crane Wings 3 for CW2_Caster[Temp]) Greater than 0
-
-
Then - Actions
-
-------- Checks Skill Duration --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_SkillDuration[Temp] Greater than 0.00
-
-
Then - Actions
-
Set CW2_SkillDuration[Temp] = (CW2_SkillDuration[Temp] - 0.03)
-
-
Else - Actions
-
-------- Removing Crane Wings Overedge Ability from Caster --------
-
Unit - Remove Crane Wings 3 from CW2_Caster[Temp]
-
-------- Showing Crane Wings Throw to Caster --------
-
Unit - Set level of Crane Wings for CW2_Caster[Temp] to 1
-
-
-
-
Else - Actions
-
-------- Recycling all the Indexes --------
-
Set CW2_MUI_2[CW2_MUI_3] = CW2_MUI_2[CW2_MUI_1]
-
Set CW2_MUI_2[CW2_MUI_1] = Temp
-
Set CW2_MUI_1 = (CW2_MUI_1 - 1)
-
Set CW2_MUI_3 = (CW2_MUI_3 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CW2_MUI_1 Equal to 0
-
-
Then - Actions
-
-------- Turning off this trigger. Pointless to keep running --------
-
Trigger - Turn off (This trigger)
-
-------- -------------------------------------------------------- --------
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
I test the MUI-bility of the trigger by automatically ordering another copy of the unit to cast the same ability.. Also if someone can tell me an easier way of doing this, IE getting the target unit from the first spell to be used in the 2nd spell, Id appreciate that much =D. Also theres still a third activation for this spell.
Some Explantion for the Variables
CW#_SkillDuration - is the seconds of availabilty of the next spell..
BTW the whole point of increasing that whenever the next spell is casted is to keep that ability, since the next spell is channelled. Really trying to not rely on Pauses =D
Last edited by a moderator: