• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

The use of GetLocalPlayer to run a trigger once for the non local?

Status
Not open for further replies.
Level 13
Joined
Oct 10, 2009
Messages
439
Alrighty, At the moment I have an integer for the players number that the timer is ending for.

And seeing as its a timer, the GetLocalPlayer would not work. And So, Im wondering is there a way for GLP to work for the destinated player integer?



Also, I wish to have it run for a player group, so that it does not end the mask for everyone else when they run the preliminary trigger, should it look like this:

  • Player Group - Add owner of triggering unit to TempForce
  • Set AlphaReal = 100
  • Custom Script: if (IsPlayerInForce(GetLocalPlayer(), udg_TempForce))
  • Set AlphaReal = 0
  • Custom Script: Endif
  • Environment - set fog with colors (AlphaReal) (AlphaReal (AlphaReal)
 
GetLocalPlayer() can be used for anything, the only thing to watch out for when using it is for de-synchs. Starting a timer does not cause a de-synch if done locally, however creating one locally does. The comparison GetLocalPlayer() != null will perform the actions for every player, but each player will think he's the only player who executed the actions.
 
Status
Not open for further replies.
Top