• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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

Status
Not open for further replies.
Level 12
Joined
Oct 10, 2009
Messages
438
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