Will this desync: Playing Sound.

Danis[h]

New Member
Reaction score
19
Well, I heard using LocalPlayer was risky because it could cause desyncs, so I was wondering if it was okay to use it in this manner.

Trigger:
  • Movement Sound
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • (Unit-type of (Ordered unit)) Equal to Noisy sheep
    • Actions
      • Custom script: if GetOwningPlayer(GetTriggerUnit()) == GetLocalPlayer() then
      • Set Sound = boing <gen>
      • Custom script: else
      • Set Sound = No sound
      • Custom script: endif
      • Sound - Play Sound
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Well, I heard using LocalPlayer was risky because it could cause desyncs, so I was wondering if it was okay to use it in this manner.

I think it is ok because you don't create or destroy sound

And I think this trigger should be fine too:
Trigger:
  • Movement Sound
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • (Unit-type of (Ordered unit)) Equal to Noisy sheep
    • Actions
      • Custom script: if GetOwningPlayer(GetTriggerUnit()) == GetLocalPlayer() then
      • Sound - Play boing <gen>
      • Custom script: endif
 

Azlier

Old World Ghost
Reaction score
461
>I think it is ok because you don't create or destroy sound

Yes you do.

Playing a sound in a GetLocalPlayer block is fine. Just be careful what you do with Last Played Sound, since it got set locally.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top