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

Wrong Player Dummy being created.

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
Basically the wrong dummy is spawning meaning the wrong PlayerNumber[udg_Toss_CurrentIndex] is being had, but I'm not sure why it would be wrong.
What you're about to see is less than satisfactory coding, but try your best to follow it :D
I put all the triggers here, but the 1st and 2nd should be the only relevant ones.

  • Toss Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Toss_Ability
    • Actions
      • Set Toss_MaxIndex = (Toss_MaxIndex + 1)
      • Set Throwing_Unit[Toss_MaxIndex] = (Triggering unit)
      • Set PlayerNumber[Toss_MaxIndex] = (Player number of (Owner of Throwing_Unit[Toss_MaxIndex]))
      • Set Toss_TargetPoint[Toss_MaxIndex] = (Target point of ability being cast)
      • Set TempLoc = (Position of Throwing_Unit[Toss_MaxIndex])
      • Set TempLoc2 = Toss_TargetPoint[Toss_MaxIndex]
      • Set Toss_Distance[Toss_MaxIndex] = (Distance between TempLoc and TempLoc2)
      • Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Not equal to (!=) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Custom value of (Matching unit)) Equal to (==) 0) and ((Matching unit) Not equal to (!=) (Triggerin
      • Set Thrown_Unit[Toss_MaxIndex] = (Random unit from TempGroup)
      • Unit - Set the custom value of Thrown_Unit[Toss_MaxIndex] to 1
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of Thrown_Unit[Toss_MaxIndex]) Not equal to (!=) Mountain Giant
          • Then - Actions
            • Unit - Pause the expiration timer for Thrown_Unit[Toss_MaxIndex]
            • Unit - Make Thrown_Unit[Toss_MaxIndex] Invulnerable
          • Else - Actions
      • Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_MaxIndex], 0)
      • Custom script: if UnitAddAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf')
      • Custom script: endif
      • Trigger - Turn on Toss Loop <gen>
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • Toss Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Toss_MaxIndex Equal to (==) 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do Multiple ActionsFor each (Integer Toss_CurrentIndex) from 1 to Toss_MaxIndex, do (Actions)
            • Loop - Actions
              • Set TempLoc = (Position of Thrown_Unit[Toss_CurrentIndex])
              • Set TempLoc2 = Toss_TargetPoint[Toss_CurrentIndex]
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Distance between TempLoc and TempLoc2) Less than or equal to (<=) Toss_ThresholdRange
                  • Then - Actions
                    • Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_CurrentIndex], 1)
                    • Special Effect - Create a special effect attached to the origin of Thrown_Unit[Toss_CurrentIndex] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                    • Special Effect - Destroy (Last created special effect)
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Not equal to (!=) Mountain Giant
                        • Then - Actions
                          • Unit - Explode Thrown_Unit[Toss_CurrentIndex]
                          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                    • Set TempGroup = (Units within Toss_AOE[PlayerNumber[Toss_CurrentIndex]] of TempLoc matching ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]])) Not equal to (!=) True) and ((
                    • Unit - Create 1 Dummy for (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]]) at TempLoc2 facing Default building facing (270.0) degrees
                    • Set TempUnit = (Last created unit)
                    • Unit - Add a 10.00 second Generic expiration timer to TempUnit
                    • Unit Group - Pick every unit in TempGroup and do (Actions)
                      • Loop - Actions
                        • Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Nuke Rock
                            • Then - Actions
                              • Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
                            • Else - Actions
                              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Icy Rock
                                • Then - Actions
                                  • Unit - Order TempUnit to Undead Lich - Frost Nova (Picked unit)
                                  • Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.25) damage of attack type Spells and damage type Cold
                                • Else - Actions
                                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Fiery Rock
                                    • Then - Actions
                                      • Unit - Order TempUnit to Human Mountain King - Storm Bolt (Picked unit)
                                      • Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.05) damage of attack type Spells and damage type Normal
                                    • Else - Actions
                    • Unit - Set the custom value of Thrown_Unit[Toss_CurrentIndex] to 0
                    • Animation - Change Thrown_Unit[Toss_CurrentIndex] flying height to 0.00 at 650.00
                    • Set Thrown_Unit[Toss_CurrentIndex] = Thrown_Unit[Toss_MaxIndex]
                    • Set Toss_TargetPoint[Toss_CurrentIndex] = Toss_TargetPoint[Toss_MaxIndex]
                    • Set PlayerNumber[Toss_CurrentIndex] = PlayerNumber[Toss_MaxIndex]
                    • Set Toss_CurrentIndex = (Toss_CurrentIndex - 1)
                    • Set Toss_MaxIndex = (Toss_MaxIndex - 1)
                    • Custom script: call RemoveLocation(udg_TempLoc2)
                    • Custom script: call DestroyGroup(udg_TempGroup)
                  • Else - Actions
                    • Set TempReal = (Angle from TempLoc to TempLoc2)
                    • Custom script: call SetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Cos(bj_DEGTORAD * udg_TempReal))
                    • Custom script: call SetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Sin(bj_DEGTORAD * udg_TempReal))
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between Toss_TargetPoint[Toss_CurrentIndex] and TempLoc) Less than or equal to (<=) (Toss_Distance[Toss_CurrentIndex] / 2.00)
                        • Then - Actions
                          • Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 0),650)
                        • Else - Actions
                          • Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 1300), 650)
              • Custom script: call RemoveLocation(udg_TempLoc)
  • Toss Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer TempInteger) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Toss_AOE[TempInteger] = 250.00
          • Set Toss_Speed[TempInteger] = 800.00
          • Set Toss_SpeedInterval[TempInteger] = (Toss_Speed[TempInteger] x 0.03)
          • Set Toss_Damage[TempInteger] = 250.00
          • Set RockQuality[TempInteger] = 0.00
          • Set RockCount[TempInteger] = 3
          • Set RockCount_TimerLength[TempInteger] = 30.00
          • Countdown Timer - Start RockCount_Timer[TempInteger] as a One-shot timer that will expire in 30.00 seconds
      • Set Toss_ThresholdRange = 100.00
      • Set Toss_Ability = Toss (New)
  • Stop Toss
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (==) (Order(healingspray))
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempLoc2 = (Target point of issued order)
      • Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Not equal to (!=) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Custom value of (Matching unit)) Equal to (==) 0) and ((Matching unit) Not equal to (!=) (Triggerin
      • Set TempPlayer = (Triggering player)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in TempGroup) Greater than (>) 0
          • Then - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • GameMode Equal to (==) 1
              • Then - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Multiple ConditionsOr - Any (Conditions) are true
                      • Conditions
                        • (SelectedRegions[1] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[2] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[3] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[4] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[5] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[6] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[8] contains TempLoc2) Equal to (==) True
                        • (SelectedRegions[7] contains TempLoc2) Equal to (==) True
                  • Then - Actions
                  • Else - Actions
                    • Unit - Pause (Triggering unit)
                    • Unit - Order (Triggering unit) to Stop
                    • Unit - Unpause (Triggering unit)
                    • Custom script: call SimError(udg_TempPlayer, udg_ErrorString[1])
              • Else - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Multiple ConditionsOr - Any (Conditions) are true
                      • Conditions
                        • (SelectedRegions[9] contains TempLoc2) Equal to (==) True
                  • Then - Actions
                  • Else - Actions
                    • Unit - Pause (Triggering unit)
                    • Unit - Order (Triggering unit) to Stop
                    • Unit - Unpause (Triggering unit)
                    • Custom script: call SimError(udg_TempPlayer, udg_ErrorString[1])
          • Else - Actions
            • Unit - Pause (Triggering unit)
            • Unit - Order (Triggering unit) to Stop
            • Unit - Unpause (Triggering unit)
            • Custom script: call SimError(udg_TempPlayer, udg_ErrorString[2])
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Hm, still not making the proper dummy, I think I followed what you said right...

  • Toss Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Toss_Ability
    • Actions
      • Set Toss_MaxIndex = (Toss_MaxIndex + 1)
      • Set Throwing_Unit[Toss_MaxIndex] = (Triggering unit)
      • Set PlayerNumber[Toss_MaxIndex] = (Player number of (Owner of Throwing_Unit[Toss_MaxIndex]))
      • Set Toss_TargetPoint[Toss_MaxIndex] = (Target point of ability being cast)
      • Set TempLoc = (Position of Throwing_Unit[Toss_MaxIndex])
      • Set TempLoc2 = Toss_TargetPoint[Toss_MaxIndex]
      • Set Toss_Distance[Toss_MaxIndex] = (Distance between TempLoc and TempLoc2)
      • Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Not equal to (!=) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Custom value of (Matching unit)) Equal to (==) 0) and ((Matching unit) Not equal to (!=) (Triggerin
      • Set Thrown_Unit[Toss_MaxIndex] = (Random unit from TempGroup)
      • Unit - Set the custom value of Thrown_Unit[Toss_MaxIndex] to 1
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of Thrown_Unit[Toss_MaxIndex]) Not equal to (!=) Mountain Giant
          • Then - Actions
            • Unit - Pause the expiration timer for Thrown_Unit[Toss_MaxIndex]
            • Unit - Make Thrown_Unit[Toss_MaxIndex] Invulnerable
          • Else - Actions
      • Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_MaxIndex], 0)
      • Custom script: if UnitAddAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf')
      • Custom script: endif
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Toss_MaxIndex Equal to (==) 1
          • Then - Actions
            • Trigger - Turn on Toss Loop <gen>
          • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)
  • Toss Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Toss_MaxIndex Equal to (==) 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do Multiple ActionsFor each (Integer Toss_CurrentIndex) from 1 to Toss_MaxIndex, do (Actions)
            • Loop - Actions
              • Set TempLoc = (Position of Thrown_Unit[Toss_CurrentIndex])
              • Set TempLoc2 = Toss_TargetPoint[Toss_CurrentIndex]
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Distance between TempLoc and TempLoc2) Less than or equal to (<=) Toss_ThresholdRange
                  • Then - Actions
                    • Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_CurrentIndex], 1)
                    • Special Effect - Create a special effect attached to the origin of Thrown_Unit[Toss_CurrentIndex] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                    • Special Effect - Destroy (Last created special effect)
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Not equal to (!=) Mountain Giant
                        • Then - Actions
                          • Unit - Explode Thrown_Unit[Toss_CurrentIndex]
                          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                    • Set TempGroup = (Units within Toss_AOE[PlayerNumber[Toss_CurrentIndex]] of TempLoc matching ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]])) Not equal to (!=) True) and ((
                    • Unit - Create 1 Dummy for (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]]) at TempLoc2 facing Default building facing (270.0) degrees
                    • Set TempUnit = (Last created unit)
                    • Unit - Add a 10.00 second Generic expiration timer to TempUnit
                    • Unit Group - Pick every unit in TempGroup and do (Actions)
                      • Loop - Actions
                        • Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Nuke Rock
                            • Then - Actions
                              • Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
                            • Else - Actions
                              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Icy Rock
                                • Then - Actions
                                  • Unit - Order TempUnit to Undead Lich - Frost Nova (Picked unit)
                                  • Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.25) damage of attack type Spells and damage type Cold
                                • Else - Actions
                                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Fiery Rock
                                    • Then - Actions
                                      • Unit - Order TempUnit to Human Mountain King - Storm Bolt (Picked unit)
                                      • Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.05) damage of attack type Spells and damage type Normal
                                    • Else - Actions
                    • Unit - Set the custom value of Thrown_Unit[Toss_CurrentIndex] to 0
                    • Animation - Change Thrown_Unit[Toss_CurrentIndex] flying height to 0.00 at 650.00
                    • Set Thrown_Unit[Toss_CurrentIndex] = Thrown_Unit[Toss_MaxIndex]
                    • Set Throwing_Unit[Toss_CurrentIndex] = Throwing_Unit[Toss_MaxIndex]
                    • Set Toss_TargetPoint[Toss_CurrentIndex] = Toss_TargetPoint[Toss_MaxIndex]
                    • Set PlayerNumber[Toss_CurrentIndex] = PlayerNumber[Toss_MaxIndex]
                    • Set Toss_CurrentIndex = (Toss_CurrentIndex - 1)
                    • Set Toss_MaxIndex = (Toss_MaxIndex - 1)
                    • Custom script: call RemoveLocation(udg_TempLoc2)
                    • Custom script: call DestroyGroup(udg_TempGroup)
                  • Else - Actions
                    • Set TempReal = (Angle from TempLoc to TempLoc2)
                    • Custom script: call SetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Cos(bj_DEGTORAD * udg_TempReal))
                    • Custom script: call SetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Sin(bj_DEGTORAD * udg_TempReal))
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between Toss_TargetPoint[Toss_CurrentIndex] and TempLoc) Less than or equal to (<=) (Toss_Distance[Toss_CurrentIndex] / 2.00)
                        • Then - Actions
                          • Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 0),650)
                        • Else - Actions
                          • Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 1300), 650)
              • Custom script: call RemoveLocation(udg_TempLoc)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
That should've worked.
this should be at the end of your trigger though.
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • Toss_MaxIndex Equal to (==) 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions
you need to remove the location leak
Set TempLoc2 = Toss_TargetPoint[Toss_CurrentIndex]

for your problem
try to display the player number of the owner of that unit using a game message and tell me what it says.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Hm, well...I can't remove TempLoc2 before the spell ends because it is pointing to where the unit is going...maybe I need to save it differently then...

To your question about the PlayerNumbers it displays what seems to be the right player numbers, but it makes either not ENOUGH dummies, or dummies for the wrong person...Example... Player 1 and 2 casts at the same time it seems to make 2 dummies, both for player 1.

Edit: I was testing by ordering both with ESC...maybe it couldn't catch both... so maybe it actually does work now
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
I changed the unit created for owner of blahblah to TempPlayer and I set the Player using the PlayerNumber variable which was working properly and now it works. Also just played a 50 min game and there was no change in performance so either TempLoc2 wasn't leaking or it somehow did not interfere.

@Maker
Didn't check, found this solution first, but it may work too.

Thanks!
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Yeah...every time you save over temploc and don't remove it, it leaks, but on average each cast probably lasted like 2 seconds, meaning 66 times the location was set, the spell tied to this has a 5 second cooldown, and people are spamming it, meaning about 12 casts a minute. That would be thousands of leaks per person per minute, and somehow I played for 50 minutes with not a single problem... Odd... How would you recommend I save the point of the ability being cast? I need it to direct which way the unit is thrown.
 
Status
Not open for further replies.
Top