• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Weird undetectable bug in my ability

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
I've been combing this ability for a while but for some reason i can't find a bug that cuases one of my dummy units to spontaniously die

Code:
Fan Movement
    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
                FanTravel_DIST Less than or equal to 0.00
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        FanRotationCounter Greater than or equal to 279.00
                    Then - Actions
                        Set CurrentFanLeftPoint = ((Position of FanLeft) offset by 30.00 towards (Angle from (Position of FanLeft) to (Position of WindEnchantress)) degrees)
                        Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
                        Set CurrentFanRightPoint = ((Position of FanRight) offset by 30.00 towards (Angle from (Position of FanRight) to (Position of WindEnchantress)) degrees)
                        Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
                        Set TrackWE_Point = (Position of WindEnchantress)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between CurrentFanLeftPoint and TrackWE_Point) Less than or equal to 20.00
                            Then - Actions
                                Unit - Kill FanLeft
                                Unit - Remove FanLeft from the game
                                Unit - Kill FanRight
                                Unit - Remove FanRight from the game
                                Unit Group - Remove all units from PotentialTargetsFanLeft
                                Unit Group - Remove all units from PotentialTargetsFanRight
                                Unit Group - Remove all units from SafeTargetsFanLeft
                                Unit Group - Remove all units from SafeTargetsFanRight
                                Custom script:   call RemoveLocation(udg_TrackWE_Point)
                                Custom script:   call RemoveLocation(udg_CurrentFanLeftPoint)
                                Custom script:   call RemoveLocation(udg_CurrentFanRightPoint)
                                Custom script:   call RemoveLocation(udg_Fan_Left_Point_1)
                                Custom script:   call RemoveLocation(udg_Fan_Right_Point_1)
                                Trigger - Turn off (This trigger)
                            Else - Actions
                                Do nothing
                    Else - Actions
                        Set CurrentFanLeftPoint = (Fan_Left_Point_1 offset by 250.00 towards ((Angle from Fan_Left_Point_1 to (Position of FanLeft)) + 9.00) degrees)
                        Set CurrentFanRightPoint = (Fan_Right_Point_1 offset by 250.00 towards ((Angle from Fan_Right_Point_1 to (Position of FanRight)) - 9.00) degrees)
                        Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
                        Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
                        Set FanRotationCounter = (FanRotationCounter + 9.00)
            Else - Actions
                Set CurrentFanLeftPoint = ((Position of FanLeft) offset by 30.00 towards FanLeftAngle degrees)
                Set CurrentFanRightPoint = ((Position of FanRight) offset by 30.00 towards FanRightAngle degrees)
                Set FanTravel_DIST = (FanTravel_DIST - 30.00)
                Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
                Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
        Set PotentialTargetsFanLeft = (Units within 100.00 of CurrentFanLeftPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanLeft) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) 
        Unit Group - Pick every unit in PotentialTargetsFanLeft and do (Actions)
            Loop - Actions
                Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss  for WindEnchantress))))) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
                Special Effect - Destroy (Last created special effect)
                Unit Group - Remove (Picked unit) from PotentialTargetsFanLeft
                Unit Group - Add (Picked unit) to SafeTargetsFanLeft
        Custom script:   call RemoveLocation(udg_CurrentFanLeftPoint)
        Set PotentialTargetsFanRight = (Units within 100.00 of CurrentFanRightPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanRight) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit
        Unit Group - Pick every unit in PotentialTargetsFanRight and do (Actions)
            Loop - Actions
                Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss  for WindEnchantress))))) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
                Special Effect - Destroy (Last created special effect)
                Unit Group - Remove (Picked unit) from PotentialTargetsFanRight
                Unit Group - Add (Picked unit) to SafeTargetsFanRight
        Custom script:   call RemoveLocation(udg_CurrentFanRightPoint)
        Custom script:   call RemoveLocation(udg_TrackWE_Point)

every time at one point, ususally when i cast and it hits enemy units with enabled attacks, the right "fan" missle dies and just goes away so i don't lnow why since i only have 1 function that kills and removes it
 
Level 10
Joined
Jul 2, 2004
Messages
690
dont remove the dummy unit instantly. either wait for 2 seconds or add a 2 second expiration timer.
 
Status
Not open for further replies.
Top