• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Does Adding special effects desynch?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Will either of these local player blocks cause a desynch?

I would think not, but would just like to verify.

JASS:
		if GetLocalPlayer() == players[pid] then
			set goalEffect = AddSpecialEffectTarget("Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl", u, "head")
		endif

and

JASS:
		if GetLocalPlayer() == players[pid] then
			call DestroyEffect(goalEffect)
		endif

Many thanks!
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
You need to do something like this

JASS:
local string s = "effect model"
if GetLocalPlayer() != yourPlayer then
    set s = ""
endif
call AddSpecialEffect(s, ...)
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Many thanks for the solution and explanations.

This works.

I was thinking it was funny, because it created an object that had to later be deleted.

So basically any call that creates an object (an agent) can't be done in a local block if that is my take, even if it's only visual.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you can create objects(lightnings and texttags are proof of this), but not agents, because they are reference counted, and if one ref counter is not synced throughout the players, your game desyncs, and Warcraft 3's way of dealing with desyncs is just to crash the desynced player compared to the host(most likely)
 
Status
Not open for further replies.
Top