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

Status
Not open for further replies.
Level 10
Joined
Sep 25, 2013
Messages
521
I'm using a 3D knockback system for this ability and it consistently causes about half of the players to be desynched when used. Is there anything that stands out as being a likely cause of this?

  • You Shall Not Pass Start Effect
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to You Shall Not Pass! (Gandalf)
    • Actions
      • Set VariableSet tempPoint = (Position of (Triggering unit))
      • Special Effect - Create a special effect at tempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at tempPoint using war3mapImported\BlueAftershock.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Gandalf Lightning Unit for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Bolt (You Shall Not Pass Effect) to (Last created unit)
      • Set VariableSet tempUnitGroup = (Units within 500.00 of tempPoint.)
      • Unit Group - Pick every unit in tempUnitGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet PickedUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PickedUnit is Mechanical) Equal to False
              • (PickedUnit is A flying unit) Equal to False
              • (PickedUnit is dead) Equal to False
              • (PickedUnit belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
            • Then - Actions
              • Set VariableSet tempPoint2 = (Position of PickedUnit)
              • Unit - Move (Last created unit) instantly to tempPoint2
              • Unit - Order (Last created unit) to Neutral - Firebolt PickedUnit
              • Set VariableSet KB3D_GroundDamage = True
              • Set VariableSet KB3D_Accel = 0.00
              • Set VariableSet KB3D_Angle = (Angle from tempPoint to tempPoint2)
              • Set VariableSet KB3D_DestroyTree = True
              • Set VariableSet KB3D_DisableUnit = True
              • Set VariableSet KB3D_EndOnObstacle = True
              • Set VariableSet KB3D_D_MECHANICAL = False
              • Set VariableSet KB3D_Fx = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
              • Set VariableSet KB3D_Attach = chest
              • Set VariableSet KB3D_Range = 200.00
              • Set VariableSet KB3D_Speed = 500.00
              • Set VariableSet KB3D_Targeted_Unit = No unit
              • Set VariableSet KB3D_Unit = PickedUnit
              • Set VariableSet KB3D_UnpathableStop = True
              • Set VariableSet KB3D_Zoffset = 50.00
              • Set VariableSet KB3D_TrailFx = Abilities\Weapons\Bolt\BoltImpact.mdl
              • Set VariableSet KB3D_TargetDamage = 0.00
              • Set VariableSet KB3D_Damager = Rampage_Unit
              • Set VariableSet KB3D_LoopDamage = 0.00
              • Set VariableSet KB3D_ImpactDamage = 0.00
              • Set VariableSet KB3D_AttackType = Normal
              • Set VariableSet KB3D_DamageType = Magic
              • Custom script: call ExecuteFunc( "KB3D_Registration" )
              • Custom script: call RemoveLocation (udg_tempPoint2)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_tempPoint)
      • Custom script: call DestroyGroup (udg_tempUnitGroup)
  • You Shall Not Pass Start Casting
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to You Shall Not Pass! (Gandalf)
    • Actions
      • Sound - Play GandalfYouShallNotPass_Edited <gen>
  • You Shall Not Pass Stop Casting
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to You Shall Not Pass! (Gandalf)
    • Actions
      • Sound - Stop GandalfYouShallNotPass_Edited <gen> After fading
Do you think its just because too many units are being knocked back at once, since it is like a 500 area of effect? Or because I'm using a dummy unit to cast stormbolt on each affected unit to stun them and thats somehow conflicting with the knockback?

Thank you for your time
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
Doesn't sound like a desyncing issue. Sounds like you're crashing the game with either an infinite loop or you're pushing units out of the map bounds. Edit: On second thought, if there was an infinite loop then everyone would crash.

If you're certain that it's not one of those two issues, then it's probably the system itself.

Bribe has a good knockback system that you can use instead.
 
Last edited:
Level 10
Joined
Sep 25, 2013
Messages
521
Doesn't sound like a desyncing issue. Sounds like you're crashing the game with either an infinite loop or you're pushing units out of the map bounds. Edit: On second thought, if there was an infinite loop then everyone would crash.

If you're certain that it's not one of those two issues, then it's the system itself.

Bribe has a good knockback system that you can use instead.

Well I'll try bribes system out then. Its strange because im using the system for other things in the map and causes no problems in those cases. Just this one ability. I wonder if stopping the sound after fading could cause this problem. Cause, people get desynched like 1 to 1.5 second after the ability is cast. I just dont know, thanks for your help though

I had edited the Fade out rate to be 3, I dont know if this field is bugged. I doubt it but just in case
upload_2021-2-16_21-35-53.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
I imagine the only desync caused by a sound would be if you used GetLocalPlayer(). But maybe there's some weird issue going on with it.

Are you sure you're using the Knockback system correctly?

I see "Set VariableSet KB3D_Targeted_Unit = No unit", I don't know how the system works exactly but that doesn't sound right.

Also, you probably don't have to Set the majority of those knockback Variables for EACH Picked unit. Unless the system automatically nulls their values, it'd be better to Set them before you Pick Every Unit.
Excluding "Set VariableSet KB3D_Unit = PickedUnit" since that variable actually needs to change.

Another thing, you may want to store your Dummy unit as a Variable instead of referencing Last Created Unit. It's probably fine using Last Created Unit in this particular case but sometimes it can cause problems.
 
Level 10
Joined
Sep 25, 2013
Messages
521
I imagine the only desync caused by a sound would be if you used GetLocalPlayer(). But maybe there's some weird issue going on with it.

Are you sure you're using the Knockback system correctly?

I see "Set VariableSet KB3D_Targeted_Unit = No unit", I don't know how the system works exactly but that doesn't sound right.

Also, you probably don't have to Set the majority of those knockback Variables for EACH Picked unit. Unless the system automatically nulls their values, it'd be better to Set them before you Pick Every Unit.
Excluding "Set VariableSet KB3D_Unit = PickedUnit" since that variable actually needs to change.

Another thing, you may want to store your Dummy unit as a Variable instead of referencing Last Created Unit. It's probably fine using Last Created Unit in this particular case but sometimes it can cause problems.

Thanks for the optimization tips, Im going to implement those. I'm not sure what the function of KB3D_Targeted_Unit is. Its not for the knockback target cause KB3D_Unit variable is for that

[Image]
upload_2021-2-17_11-0-49.png

[/Image]

I did notice one thing, For KB3D_Damager i had it put equal to Rampage_Unit which is a variable for a different knockback ability. So I'm going to change that to "No Unit" for now.

EDIT: I tested without using the sound to be sure and that has no effect, still desynch. The Rampage_Unit variable had no effect either. I think Im just going to try bribes system. Thanks for your help
 
Status
Not open for further replies.
Top