Playing a sound for a player?

Azlier

Old World Ghost
Reaction score
461
>This will prevent Desyncs better

That'll cause desyncs. If it compiled, that is. The first is the correct answer.
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
How could Lehona's trigger can Desync? It just uses string, I know string, integers, real, and boolean doesn't desync.
 

Azlier

Old World Ghost
Reaction score
461
If you use a string for the first time, it gets tossed into WC3's string table. It's reaaally bad to modify the string table locally.
 

Lehona

New Member
Reaction score
12
Creating variables local is bad, modifying them won't cause a desync or such.
 

Azlier

Old World Ghost
Reaction score
461
No idea what you're trying to say.
 

Azlier

Old World Ghost
Reaction score
461
It will if "YourSound" was a string never used before.

Really, the first answer was the perfect answer.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
It will if "YourSound" was a string never used before.

Really, the first answer was the perfect answer.

Out of curiosity, would the same apply to this?

Don't ask why I'm asking this, I just remember reading something a very long time ago about it and I was always curious whether or not the same rule applied:
JASS:
function haha takes nothing returns nothing
    local sound snd = "YourSound"
    if GetLocalPlayer() != Player(0) then
        set snd = ""
    endif
    call StartSound(snd)
endfunction
 

saw792

Is known to say things. That is all.
Reaction score
280
Well we (I?) used to think so, but it seems "" is in the string table by default anyway so there are no issues there (according to Azlier).
 

Azlier

Old World Ghost
Reaction score
461
Indeed the subject was well tested by a few of our scientists.

And people, please realize that sounds are handles and not strings.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top