• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Localplayer again

Status
Not open for further replies.
Level 6
Joined
Jan 12, 2010
Messages
132
Tested with sfx as u guys show me work,at last for some time.
Tested :
  • ///hand written sry///
  • Unit - Create a unit x at temp_point etc etc
  • Set - Local_player = player 1 red
  • Custom Script: if ( not ( GetLocalPlayer () == udg_Local_player ) ) then
  • Unit - Hide (last created unit)
  • Custom Script: endif
This desync and disconnect 100%.Also tested this code on a blank map with some friends and dont work.
Any sugestion about how to hide a unit for rest of players without creating desync?
 
incorrect.

unit must have locust. if the unit has locust, this will never desync.

also,

not GetLocalPlayer() == udg_Local_Player -> GetLocalPlayer() != udg_Local_Player

if your just being stubborn than this also works

  • Test 1
    • Events
    • Player - Player 1 (Red) types a chat message containing test as An exact match
    • Conditions
    • Actions
    • Set Player = (Triggering player)
    • Set Unit = Peasant 0000 <gen>
    • Set Alpha = 100
    • Custom script: if GetLocalPlayer() == udg_Player then
    • Set Alpha = 0
    • Custom script: endif
    • Animation - Change Unit's vertex coloring to (100%, 100%, 100%) with Alpha transparency
 
ok tested
this code desync but in time (not instant)
Code:
if ( not ( GetLocalPlayer () == udg_Local_player ) ) then
your code seems not to desync,dont sure in what happens in time
Code:
if GetLocalPlayer() != udg_Local_player then
 
As I have mentioned before, if you apply a global function (outside the GetLocalPlayer block), that function will be applied to all players compared to the function you call insided a GetLocalPlayer block.

NOTE: Just apply the function outside the GetLocalPlayer block - while inside the block, you just set the variable.
 
As I have mentioned before, if you apply a global function (outside the GetLocalPlayer block), that function will be applied to all players compared to the function you call insided a GetLocalPlayer block.

NOTE: Just apply the function outside the GetLocalPlayer block - while inside the block, you just set the variable.

It's just the same here ...
You know even some GUI functions use GetLocalPlayer in this way, there is no need to add overhead with a variable.

But as said hide an unit for a specific player is likely to desync, locust unit or not.
The safe way is to "hide" the unit with color setting :

https://www.hiveworkshop.com/forums/2259413-post22.html
 
Dummy unit have the moddel of some missiles.So what u suggest me to use?
And another question,as I know so far a hidden unit dont make lagg,what about a unit with 100% transparency?

I guess I`ll use Arhowk method.Hope it works.
 
Status
Not open for further replies.
Back
Top