So I created an ability through triggers but when casting, the game crash.
The ability is suppose to "summon" 8 clones of yourself in a circle of target while the caster will be hidden. (I make it 1000 around the unit)
Every second, one of the clone will move forward to another end of the circle and damage will be dealt units in the AOE. The final clone will deal a higher damage.
So I tried the simplest way to get it right first before making it MUI (I actually don't know how to MUI :3) but it crash after making almost everything.
Here is a noob trigger I have made.
Sorry for my grammar mistakes and my noob ability of trigger. >_<
Thank you if you help on this. >_<
Edited: Solved
The ability is suppose to "summon" 8 clones of yourself in a circle of target while the caster will be hidden. (I make it 1000 around the unit)
Every second, one of the clone will move forward to another end of the circle and damage will be dealt units in the AOE. The final clone will deal a higher damage.
So I tried the simplest way to get it right first before making it MUI (I actually don't know how to MUI :3) but it crash after making almost everything.
Here is a noob trigger I have made.
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Hassou Tobi
-
Actions
- If (HT_Count Greater than or equal to 1000) then do (Set HT_Count = 0) else do (Set HT_Count = (HT_Count + 1))
- If (Loop_1_Count Greater than or equal to 1000) then do (Set Loop_1_Count = 0) else do (Set Loop_1_Count = (Loop_1_Count + 1))
- Set Loop_1[Loop_1_Count] = 0
- Set HT_Caster[HT_Count] = (Triggering unit)
- Set HT_Level = (Level of Hassou Tobi for HT_Caster[HT_Count])
- Set HT_TempLoc[HT_Count] = (Target point of ability being cast)
-
For each (Integer Loop_1[Loop_1_Count]) from 1 to 8, do (Actions)
-
Loop - Actions
- Set HT_TempLoc2[HT_Count] = (HT_TempLoc[HT_Count] offset by (HT_Max_AOE[HT_Level] / 2.00) towards (45.00 x (Real(Loop_1[Loop_1_Count]))) degrees)
- Unit - Create 1 Ronnin Mirror for (Owner of HT_Caster[HT_Count]) at HT_TempLoc2[HT_Count] facing (Angle from HT_TempLoc2[HT_Count] to HT_TempLoc[HT_Count]) degrees
- Set HT_KeyId = (Key (Last created unit))
- Set HT_Temp_Unit[Loop_1[Loop_1_Count]] = (Last created unit)
- Unit - Add Phoenix Fx to (Last created unit)
- Unit Group - Add (Last created unit) to HT_Dummy_Group
- Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 35.00% transparency
- Custom script: call SetUnitAnimationByIndex( GetLastCreatedUnit(), 14)
- Hashtable - Save HT_Level as 0 of HT_KeyId in HT_Hash
- Hashtable - Save HT_Count as 1 of HT_KeyId in HT_Hash
- Hashtable - Save HT_Damage_Total_PS[HT_Count] as 2 of HT_KeyId in HT_Hash
- Hashtable - Save HT_Damage_Total_Final[HT_Count] as 3 of HT_KeyId in HT_Hash
- Hashtable - Save 0.00 as 4 of HT_KeyId in HT_Hash
- Custom script: call RemoveLocation(udg_HT_TempLoc2[udg_HT_Count])
-
Loop - Actions
- Hashtable - Save Handle OfHT_TempLoc[HT_Count] as 5 of HT_KeyId in HT_Hash
- Custom script: call RemoveLocation(udg_HT_TempLoc[udg_HT_Count])
- Trigger - Turn on Hassou Tobi Loops <gen>
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (HT_Dummy_Group is empty) Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in HT_Dummy_Group and do (Actions)
-
Loop - Actions
- Set Unit = (Picked unit)
- Custom script: set udg_HT_KeyId = GetHandleId(udg_Unit) // I do not know how to use hashtable
-
Loop - Actions
- Set HT_DistX = (Load 4 of HT_KeyId from HT_Hash)
- Set HT_Level = (Load 0 of HT_KeyId from HT_Hash)
- Set HT_TempLoc[HT_Count] = (Position of HT_Temp_Unit[HT_Dummy_Int])
- Set HT_TempLoc2[HT_Count] = (HT_TempLoc[HT_Count] offset by HT_DistX towards (Facing of HT_Temp_Unit[HT_Dummy_Int]) degrees)
- Set HT_TempLoc3[HT_Count] = (Position of HT_Caster[HT_Count])
- Custom script: call SetUnitAnimationByIndex( udg_HT_Temp_Unit[udg_HT_Dummy_Int], 7)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HT_Max_AOE[HT_Level] Greater than HT_DistX
-
Then - Actions
- Hashtable - Save (HT_DistX + 15.00) as 4 of HT_KeyId in HT_Hash
- Unit - Move HT_Temp_Unit[HT_Dummy_Int] instantly to HT_TempLoc2[HT_Count]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HT_Dummy_Int Less than or equal to 7
-
Then - Actions
- Set HT_Damage_Attri[HT_Count] = (HT_Damage_Attri_Multiply[HT_Level] x (Real((Agility of HT_Caster[HT_Count] (Include bonuses)))))
- Set HT_Damage_Total_PS[HT_Count] = (HT_Damage_PS[HT_Level] + HT_Damage_Attri[HT_Count])
- Set HT_TempGroup = (Units within 1000.00 of HT_TempLoc3[HT_Count] matching ((((Matching unit) belongs to an ally of (Owner of HT_Caster[HT_Count])) Equal to False) and (((Matching unit) is alive) Equal to True)))
-
Unit Group - Pick every unit in HT_TempGroup and do (Actions)
-
Loop - Actions
- Unit - Cause HT_Caster[HT_Count] to damage (Picked unit), dealing HT_Damage_Total_PS[HT_Count] damage of attack type Hero and damage type Normal
-
Loop - Actions
- Special Effect - Create a special effect at HT_TempLoc3[HT_Count] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit Group - Remove all units from HT_TempGroup
- Custom script: call DestroyGroup(udg_HT_TempGroup)
- Unit - Remove HT_Temp_Unit[HT_Dummy_Int] from the game
- Hashtable - Save 0.00 as 4 of HT_KeyId in HT_Hash
- Set HT_Dummy_Int = (HT_Dummy_Int + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HT_Dummy_Int Equal to 8
-
Then - Actions
- Set HT_Damage_Attri[HT_Count] = (HT_Damage_Attri_Multiply[HT_Level] x (Real((Agility of HT_Caster[HT_Count] (Include bonuses)))))
- Set HT_Damage_Total_Final[HT_Count] = (HT_Damage_Final[HT_Level] + HT_Damage_Attri[HT_Count])
- Set HT_TempGroup = (Units within 1000.00 of HT_TempLoc3[HT_Count] matching ((((Matching unit) belongs to an ally of (Owner of HT_Caster[HT_Count])) Equal to False) and (((Matching unit) is alive) Equal to True)))
-
Unit Group - Pick every unit in HT_TempGroup and do (Actions)
-
Loop - Actions
- Unit - Cause HT_Caster[HT_Count] to damage (Picked unit), dealing HT_Damage_Total_Final[HT_Count] damage of attack type Hero and damage type Normal
-
Loop - Actions
- Special Effect - Create a special effect at HT_TempLoc3[HT_Count] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit Group - Remove all units from HT_TempGroup
- Custom script: call DestroyGroup(udg_HT_TempGroup)
- Unit - Remove HT_Temp_Unit[HT_Dummy_Int] from the game
- Unit Group - Remove all units from HT_Dummy_Group
- Set HT_Dummy_Int = 1
- Hashtable - Clear all child hashtables of child HT_KeyId in HT_Hash
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation(udg_HT_TempLoc[udg_HT_Count])
- Custom script: call RemoveLocation(udg_HT_TempLoc2[udg_HT_Count])
- Custom script: call RemoveLocation(udg_HT_TempLoc3[udg_HT_Count])
-
Unit Group - Pick every unit in HT_Dummy_Group and do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Thank you if you help on this. >_<
Edited: Solved
Last edited: