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

[Trigger] Lose of unit control

Status
Not open for further replies.
Level 8
Joined
Sep 24, 2007
Messages
300
From time to time a weird thing happens while playing. All of a sudden a player loses control of it's units for few seconds. And usually all players lose control at the same time. The units still move and all, but none of your orders are applied. Unit won't move, attack or cast anything, it will just continue what it was doing, like autoattacking. This means it can't be lag or something like that, because if it just lagged orders would still be applied. What could be wrong? A big temporar leak?

I also noticed that this usually happens when this spell is used. It happened quite few times that player lost control of his hero when he used that spell. Is the bug in there? I am not 100% sure this is the cause every time.

  • Stops Casting ability
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • -------- Magnetricron --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Magneticron
        • Then - Actions
          • Set TempLoc[29] = (Position of (Casting unit))
          • Set TempGroup[12] = (Units within 1000.00 of TempLoc[29])
          • Unit Group - Pick every unit in TempGroup[12] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Owner of (Picked unit)) Not equal to (Owner of (Casting unit))
                      • ((Picked unit) is A structure) Not equal to True
                • Then - Actions
                  • Set TempLoc[34] = (Position of (Picked unit))
                  • Advanced - Slide (Picked unit) using ((Facing of (Casting unit)) + 0.00) degrees angle with a starting velocity of 20.00 and kill destructables in the way True
                  • Special Effect - Create a special effect at TempLoc[34] using Abilities\Spells\Human\Slow\SlowCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
          • Custom script: call RemoveLocation(udg_TempLoc[29])
          • Custom script: call RemoveLocation(udg_TempLoc[34])
          • Custom script: call DestroyGroup(udg_TempGroup[12])
        • Else - Actions

edit: could be a massive leak from the special effects or something?
 
Level 10
Joined
Jun 1, 2008
Messages
485
You use some inefficient way to do thing.

1. Don't use "Finish cast" event, use "Start the effect of ability" event.
2. Don't use If/Then/Else Function, just move the If-Condition to trigger Condition.
3. Why use TempLoc[29], TempLoc[34] and TempGroup[12]? If you remove other array instantly, just use TempLoc[1], TempLoc[2] and TempGroup[1].
4. Why add If/Then/Else function in Pick unit Function? Just set TempGroup[1] to Unit in Range Matching Condition like this
  • Set TempGroup[12] = (Units within 1000.00 of TempLoc[29] matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and (((Matching unit) is A structure) Equal to False)))
5. Don't use "Not Equal to True" in Boolean Comparison, use "Equal to False", the first will cause Blizzard Bug.
6. You must Remove TempLoc[34] in "Pick Unit Group" function, below the "Destroy SFX" function. Else, you'll cause un-removed leak.
7. Don't use (Casting Unit), use (Triggering Unit) instead, it's more faster and efficient.
8. Why you use this arithmetic ((Facing of (Casting unit)) + 0.00)? Why you add +0? it useless.
9. Don't use WEU slide function for slide unit, use Knockback system instead.

I think what cause "Player lose control from unit" is your inefficient trigger, or Your Position Leak (See number 6), or WEU slide function.
-Inefficient will cause Lag, but it just for a short time.
-Leak will cause game to slow down, it make game do not respond or take slow respond when ordered by player. But i don't know why it just temporary, usually, Leak will stand forever...
-WEU create some function badly, sometime it's not work or it leak or it's cause bug.

For information, here is the list of Knockback system in Hive.
 
Level 8
Joined
Sep 24, 2007
Messages
300
You use some inefficient way to do thing.

1. Don't use "Finish cast" event, use "Start the effect of ability" event.
2. Don't use If/Then/Else Function, just move the If-Condition to trigger Condition.
3. Why use TempLoc[29], TempLoc[34] and TempGroup[12]? If you remove other array instantly, just use TempLoc[1], TempLoc[2] and TempGroup[1].
4. Why add If/Then/Else function in Pick unit Function? Just set TempGroup[1] to Unit in Range Matching Condition like this
  • Set TempGroup[12] = (Units within 1000.00 of TempLoc[29] matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and (((Matching unit) is A structure) Equal to False)))
5. Don't use "Not Equal to True" in Boolean Comparison, use "Equal to False", the first will cause Blizzard Bug.
6. You must Remove TempLoc[34] in "Pick Unit Group" function, below the "Destroy SFX" function. Else, you'll cause un-removed leak.
7. Don't use (Casting Unit), use (Triggering Unit) instead, it's more faster and efficient.
8. Why you use this arithmetic ((Facing of (Casting unit)) + 0.00)? Why you add +0? it useless.
9. Don't use WEU slide function for slide unit, use Knockback system instead.

I think what cause "Player lose control from unit" is your inefficient trigger, or Your Position Leak (See number 6), or WEU slide function.
-Inefficient will cause Lag, but it just for a short time.
-Leak will cause game to slow down, it make game do not respond or take slow respond when ordered by player. But i don't know why it just temporary, usually, Leak will stand forever...
-WEU create some function badly, sometime it's not work or it leak or it's cause bug.

For information, here is the list of Knockback system in Hive.

1. I use starts in most of my spells, finish just for a few. I don't want to add wait axtions and it works anyway.
2. This is the part of big spell trigger that works for around 10 spells.
3. I use arrays so each spell uses different one. It can't be a problem in arrays anyway.
4. It's just a part of huge spell trigger.
5. Oke
7. Oke...
8. Oke


Ty, I will fix everything
 
Status
Not open for further replies.
Top