• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Locusted units Bugs

Status
Not open for further replies.
Level 3
Joined
Aug 20, 2010
Messages
71
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?


  • 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
      • 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


  • 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


  • 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
      • Unit Group - Remove GDD_DamageSource from Reality_Rift_Caster_Group


  • 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 (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)
              • Unit Group - Remove Chaos_Strike_Caster from Chaos_Strike_Temp_Group
            • Else - Actions
              • Set Chaos_Strike_illus = Chaos_Strike_Caster
          • 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)
          • 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
          • Unit Group - Remove Chaos_Strike_Caster from Chaos_Strike_Temp_Group
          • Unit Group - Add Chaos_Strike_Caster to Chaos_Strike_Group
        • Else - Actions


  • 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
                • Else - Actions
                  • Hashtable - Save Chaos_Strike_Int as (Key Chaos_Strike_illus_numb) of (Key (Picked unit)) in Chaos_Strike_Hash
              • Set Chaos_Strike_Int = 0
            • Else - Actions


  • 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
                • Else - 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


  • 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
 

Attachments

  • Chaos knight .w3x
    45 KB · Views: 52
Last edited:
Level 3
Joined
Aug 20, 2010
Messages
71
Done.
Check the triggers inside the Reality rift "folder".
The problem lies in the first trigger, and it uses units created by the Chaos Strike Folder.
I dont care much about leaks right now(nor does the person that is to get the map in the end) as the purpose of it, is some kind of presentation/explanation
you can see the discription of the Chaos Strike here
Some triggers inside the Reality Rift Folder might or might not be used later on depending on the way that you are going to fix this problem.
also i have set the chance on chaos strike to 100% for testing purposes so do not put more than 1 point into this skill as it can easily cause some problems.
with esc you can reset all your abilities cooldowns as well as get full hp/mp.
 
Would you mind to post triggers? It's some easier to look at triggers, because we don't have to download the whole map. (http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/)

Also I understand you right? You hide unit, remove locust, unhide unit. And after this one nearby illusion dies?
Anyway, if it's something like this I would check any other possible mistaks in other parts of your trigger(s). Maybe you made a mistake somewhere.
 
Level 3
Joined
Aug 20, 2010
Messages
71
Also I understand you right? You hide unit, remove locust, unhide unit. And after this one nearby illusion dies?
Anyway, if it's something like this I would check any other possible mistaks in other parts of your trigger(s). Maybe you made a mistake somewhere.
ok will post the triggers.

also there isnt a nearby illusion that dies, it is just more like the effect of the illusion death spawns next to the illusion that gets moved. (also this doesnt always happen)

also i dont think that the mistake is in the rest of the triggers though you can have a look at em if you want to
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
If you are doing this for range checking, you are checking range in a weird hard way.Use this:

Distance between (Position of illusion) and (Position of Reality_Rift_Caster) less than or equal to 1200

It is under real comparasion > math.
 
Level 3
Joined
Aug 20, 2010
Messages
71
oh damn i though that i couldnt get the position of the locusted illusion either.
anyways thanks
: though the visual bug i have encountered is quite interesting. It would be nice if someone makes some use/tests with it to see its "exact" origin and maybe ways to abuse it
 
Status
Not open for further replies.
Top