I have been working on a chaos knight (a slightly different version of the original one in DotA) "request" recently. It involves creating locusted illusions with his passive skill while the real thing is in moving them with the reality rift (based exactly on the original one). so to select these illusions, i hide them, order the remove locust order(through custom script) and unhide them (the reason behind this is to select them through the: units within range of point command).
The units are being moved properly that way but there is a bug/glitch where there appears 1 more illusion dying close to the position of the locusted units (this glich does not always happen but i would say that you can see that at about 60% of the times) so does anyone know how to fix this one?
The units are being moved properly that way but there is a bug/glitch where there appears 1 more illusion dying close to the position of the locusted units (this glich does not always happen but i would say that you can see that at about 60% of the times) so does anyone know how to fix this one?
-
Reality Rift Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Reality Rift
-
Actions
- Set Reality_Rift_Caster = (Casting unit)
- Set Reality_Rift_Target = (Target unit of ability being cast)
- Set Reality_Rift_Caster_Point = (Position of Reality_Rift_Caster)
- Set Reality_Rift_Target_Point = (Position of Reality_Rift_Target)
- Set Reality_Rift_Distance = (Distance between Reality_Rift_Caster_Point and Reality_Rift_Target_Point)
- Set Reality_Rift_Distance = (Random real number between (Reality_Rift_Distance x 0.30) and (Reality_Rift_Distance x 0.80))
- Set Reality_Rift_Angle = (Angle from Reality_Rift_Caster_Point to Reality_Rift_Target_Point)
- Set Reality_Rift_Final_Point = (Reality_Rift_Caster_Point offset by Reality_Rift_Distance towards Reality_Rift_Angle degrees)
- Set Reality_Rift_Damage_Duration = 1.20
- Unit Group - Add Reality_Rift_Caster to Reality_Rift_Caster_Group
-
Unit Group - Pick every unit in (Units within 1.00 of Reality_Rift_Caster_Point matching ((Matching unit) Equal to Reality_Rift_Caster)) and do (Actions)
-
Loop - Actions
- Hashtable - Save Reality_Rift_Damage_Duration as (Key Reality_Rift_Duration) of (Key (Picked unit)) in Reality_Rift_Hash
-
Loop - Actions
- Unit - Add Reality Rift Bonus Damage to Reality_Rift_Caster
- Unit - Set level of Reality Rift Bonus Damage for Reality_Rift_Caster to (Level of Reality Rift for Chaos_Strike_Caster)
- Unit - Move Reality_Rift_Caster instantly to Reality_Rift_Final_Point, facing Reality_Rift_Caster_Point
- Unit - Move Reality_Rift_Target instantly to (Reality_Rift_Final_Point offset by 25.00 towards (180.00 + Reality_Rift_Angle) degrees), facing Reality_Rift_Target_Point
- Unit - Order Reality_Rift_Caster to Attack Reality_Rift_Target
-
Unit Group - Pick every unit in Chaos_Strike_illus_Group and do (Actions)
-
Loop - Actions
- -------- If I dont hide-unhide the units and move them outside the if command, the problem dissapears but i want them to be in range of the hero) --------
- Set Reality_Rift_Illusion = (Picked unit)
- Unit - Hide (Picked unit)
- Custom script: call UnitRemoveAbility(udg_Reality_Rift_Illusion , 'Aloc' )
- Unit - Turn collision for (Picked unit) Off
- Unit - Unhide (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Reality_Rift_Illusion is in (Units within 1200.00 of (Position of Reality_Rift_Caster))) Equal to True
-
Then - Actions
- Custom script: call UnitAddAbility(udg_Reality_Rift_Illusion, 'Aloc')
- Unit - Move (Picked unit) instantly to ((Position of Reality_Rift_Target) offset by 100.00 towards (Random angle) degrees), facing (Position of Reality_Rift_Target)
- Hashtable - Save Handle OfReality_Rift_Target as (Key Chaos_Strike_Target_illus) of (Key (Picked unit)) in Chaos_Strike_Hash
- Unit - Order (Picked unit) to Attack Reality_Rift_Target
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Events
-
Reality Rift Damage Duration
-
Events
- Time - Every 0.03 seconds of game time
-
Conditions
- (Reality_Rift_Caster_Group is empty) Equal to False
-
Actions
-
Unit Group - Pick every unit in Reality_Rift_Caster_Group and do (Actions)
-
Loop - Actions
- Set Reality_Rift_Damage_Duration = (Load (Key Reality_Rift_Duration) of (Key (Picked unit)) from Reality_Rift_Hash)
- Set Reality_Rift_Damage_Duration = (Reality_Rift_Damage_Duration - 0.03)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Reality_Rift_Damage_Duration Less than or equal to 0.00
-
Then - Actions
- Unit - Remove Reality Rift Bonus Damage from (Picked unit)
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Reality_Rift_Hash
- Unit Group - Remove (Picked unit) from Reality_Rift_Caster_Group
-
Else - Actions
- Hashtable - Save Reality_Rift_Damage_Duration as (Key Reality_Rift_Duration) of (Key (Picked unit)) in Reality_Rift_Hash
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Reality_Rift_Caster_Group and do (Actions)
-
Events
-
Reality Rift Hit
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- (GDD_DamageSource is in Reality_Rift_Caster_Group) Equal to True
- GDD_Damage Greater than 0.00
-
Actions
- Unit - Remove Reality Rift Bonus Damage from GDD_DamageSource
-
Unit Group - Pick every unit in (Units within 1.00 of (Position of GDD_DamageSource) matching ((Matching unit) Equal to GDD_DamageSource)) and do (Actions)
-
Loop - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Reality_Rift_Hash
-
Loop - Actions
- Unit Group - Remove GDD_DamageSource from Reality_Rift_Caster_Group
-
Events
-
Chaos Strike Hit
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- GDD_Damage Greater than 0.00
- (Level of Chaos Strike for GDD_DamageSource) Greater than or equal to 1
-
Actions
- Set Chaos_Strike_Caster = GDD_DamageSource
- Set Chaos_Strike_Target = GDD_DamagedUnit
- Set Chaos_Strike_Int = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Chaos_Strike_Caster is in Chaos_Strike_illus_Group) Equal to True
-
Then - Actions
- Unit - Add a 0.10 second Generic expiration timer to Chaos_Strike_Caster
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Chaos_Strike_Int Less than or equal to 100
- ((Chaos_Strike_Caster is an illusion) Equal to False) or (((Chaos_Strike_Caster is an illusion) Equal to True) and ((Chaos_Strike_Caster has an item of type Aghanims Scepter (Stats only)) Equal to True))
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Chaos_Strike_Caster is in Chaos_Strike_illus_Group) Equal to True
-
Then - Actions
- Unit Group - Add Chaos_Strike_Caster to Chaos_Strike_Temp_Group
-
Unit Group - Pick every unit in Chaos_Strike_Temp_Group and do (Actions)
-
Loop - Actions
- Set Chaos_Strike_illus = (Load (Key Chaos_Strike_Caster_illus) of (Key (Picked unit)) in Chaos_Strike_Hash)
-
Loop - Actions
- Unit Group - Remove Chaos_Strike_Caster from Chaos_Strike_Temp_Group
-
Else - Actions
- Set Chaos_Strike_illus = Chaos_Strike_Caster
-
If - Conditions
-
For each (Integer A) from 1 to (Level of Chaos Strike for Chaos_Strike_Caster), do (Actions)
-
Loop - Actions
- Unit - Create 1 Chicken for (Owner of Chaos_Strike_illus) at (Position of Chaos_Strike_illus) facing (Position of Chaos_Strike_illus)
- Set Chaos_Strike_dummy = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to Chaos_Strike_dummy
- Unit - Add Item Illusions to Chaos_Strike_dummy
- Custom script: call IssueTargetOrderById(udg_Chaos_Strike_dummy,852274,udg_Chaos_Strike_illus)
-
Loop - Actions
- Unit Group - Add Chaos_Strike_Caster to Chaos_Strike_Temp_Group
-
Unit Group - Pick every unit in Chaos_Strike_Temp_Group and do (Actions)
-
Loop - Actions
- Hashtable - Save Handle OfChaos_Strike_illus as (Key Chaos_Strike_Caster) of (Key (Picked unit)) in Chaos_Strike_Hash
- Hashtable - Save Handle OfChaos_Strike_Target as (Key Chaos_Strike_Target) of (Key (Picked unit)) in Chaos_Strike_Hash
- Hashtable - Save (Level of Chaos Strike for Chaos_Strike_Caster) as (Key Chaos_Strike_illus_numb) of (Key (Picked unit)) in Chaos_Strike_Hash
-
Loop - Actions
- Unit Group - Remove Chaos_Strike_Caster from Chaos_Strike_Temp_Group
- Unit Group - Add Chaos_Strike_Caster to Chaos_Strike_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
-
Chaos Strike Spawn
-
Events
- Unit - A unit enters (Entire map)
-
Conditions
- ((Triggering unit) is an illusion) Equal to True
- ((Triggering unit) has buff Illusion) Equal to True
-
Actions
- Unit - Make (Triggering unit) Invulnerable
- Set Chaos_Strike_illus = (Triggering unit)
- Custom script: call UnitAddAbility(udg_Chaos_Strike_illus, 'Aloc')
- Unit - Set Chaos_Strike_illus acquisition range to 300.00
- -------- illusion handles --------
- Hashtable - Save 0.60 as (Key Chaos_Strike_illus_attack) of (Key (Triggering unit)) in Chaos_Strike_Hash
- -------- end illusion handles --------
- Unit - Add Cargo Hold (Orc Burrow) to Chaos_Strike_illus
- Unit Group - Add Chaos_Strike_illus to Chaos_Strike_illus_Group
- Unit - Set Chaos_Strike_illus movement speed to 522.00
- Set Chaos_Strike_Int = 1
-
Unit Group - Pick every unit in Chaos_Strike_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Chaos_Strike_Int Equal to 1
-
Then - Actions
- Set Chaos_Strike_Caster = (Load (Key Chaos_Strike_Caster) of (Key (Picked unit)) in Chaos_Strike_Hash)
- Set Chaos_Strike_Target = (Load (Key Chaos_Strike_Target) of (Key (Picked unit)) in Chaos_Strike_Hash)
- Set Chaos_Strike_Int = (Load (Key Chaos_Strike_illus_numb) of (Key (Picked unit)) from Chaos_Strike_Hash)
- Unit - Move Chaos_Strike_illus instantly to ((Position of Chaos_Strike_Target) offset by 100.00 towards (Random angle) degrees), facing (Position of Chaos_Strike_Target)
- Unit - Order Chaos_Strike_illus to Follow Chaos_Strike_Target
- Set Chaos_Strike_Int = (Chaos_Strike_Int - 1)
- -------- illusion handles --------
- Hashtable - Save Handle OfChaos_Strike_Caster as (Key Chaos_Strike_Caster_illus) of (Key (Triggering unit)) in Chaos_Strike_Hash
- Hashtable - Save Handle OfChaos_Strike_Target as (Key Chaos_Strike_Target_illus) of (Key (Triggering unit)) in Chaos_Strike_Hash
- -------- end illusion handles --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Chaos_Strike_Int Equal to 0
-
Then - Actions
- Unit Group - Remove (Picked unit) from Chaos_Strike_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in Chaos_Strike_illus_Group) Equal to False
-
Then - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Chaos_Strike_Hash
- Else - Actions
-
If - Conditions
-
Else - Actions
- Hashtable - Save Chaos_Strike_Int as (Key Chaos_Strike_illus_numb) of (Key (Picked unit)) in Chaos_Strike_Hash
-
If - Conditions
- Set Chaos_Strike_Int = 0
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
-
Chaos Strike illus attack
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Chaos_Strike_illus_Group and do (Actions)
-
Loop - Actions
- Set Chaos_Strike_real = (Load (Key Chaos_Strike_illus_attack) of (Key (Picked unit)) from Chaos_Strike_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Chaos_Strike_real Greater than 0.00
-
Then - Actions
- Set Chaos_Strike_real = (Chaos_Strike_real - 0.03)
- Hashtable - Save Chaos_Strike_real as (Key Chaos_Strike_illus_attack) of (Key (Picked unit)) in Chaos_Strike_Hash
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Chaos_Strike_real Equal to 0.00
-
Then - Actions
- Set Chaos_Strike_illus = (Picked unit)
- Unit - Remove Cargo Hold (Orc Burrow) from Chaos_Strike_illus
- Set Chaos_Strike_Target = (Load (Key Chaos_Strike_Target_illus) of (Key (Picked unit)) in Chaos_Strike_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Units within 600.00 of (Position of Chaos_Strike_illus) matching ((Matching unit) Equal to Chaos_Strike_Target)) is empty) Equal to False
-
Then - Actions
- Unit - Order Chaos_Strike_illus to Attack Chaos_Strike_Target
-
Else - Actions
- Unit - Order Chaos_Strike_illus to Stop
-
If - Conditions
- Else - Actions
-
If - Conditions
- Set Chaos_Strike_real = (Chaos_Strike_real - 0.03)
- Hashtable - Save Chaos_Strike_real as (Key Chaos_Strike_illus_attack) of (Key (Picked unit)) in Chaos_Strike_Hash
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Chaos_Strike_illus_Group and do (Actions)
-
Events
-
Chaos Strike illus clear
-
Events
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is an illusion) Equal to True
- ((Triggering unit) is in Chaos_Strike_illus_Group) Equal to True
-
Actions
- Wait 0.50 seconds
- Unit Group - Remove (Triggering unit) from Chaos_Strike_illus_Group
- Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Chaos_Strike_Hash
- Unit - Remove (Triggering unit) from the game
-
Events
Attachments
Last edited: