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

Does Adding special effects desynch?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
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,337
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