Jump to content
Robalo

setUnitTrait MP locality

Recommended Posts

Quick question:

 

Are the effects of setUnitTrait global ? Or do we need to execute it on all machines in multiplayer ?

 

Thanks

Share this post


Link to post
Share on other sites

I wouldn't bet on it beeing global. However, it should suffice to execute it where the object is local. No need to broadcast it.

Share this post


Link to post
Share on other sites

It depends I guess. Some traits like medic, engineer are subjective while others might need to be sync'd for remote units: camouflageCoef, audibleCoef. These are the ones I'm interested in.

Share this post


Link to post
Share on other sites

Its AL EG, just done a quick test on local dedi using "loadCoef" and a custom trait.

Using a non local unit will set the trait locally but will be updated back a few seconds later.

 

So yes you need to use setUnitTrait where the unit is local. AL

No you do not need to broadcast it to every machine. EG

  • Like 1

Share this post


Link to post
Share on other sites

I was hoping for that, thanks for confirming it !

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×