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

GetLocalPlayer Question

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
Is this safe/work? It works for player 1, but I haven't been able to test if other people can get it at the same time yet. Thanks

  • Bloody Screen
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempPlayer = (Triggering player)
      • Set TempReal = 0.00
      • Custom script: if GetLocalPlayer() != udg_TempPlayer then
      • Set TempReal = 100.00
      • Custom script: endif
      • Cinematic - Fade out and back in over 3.00 seconds using texture White Mask and color (100.00%, 0.00%, 0.00%) with TempReal% transparency
 
Yes it is safe. One little note is that you may want to call this:
  • Custom script: call EnableUserUI(true)
Afterward, if it isn't in a cinematic that is. This will make sure that certain UI elements (such as tooltips) aren't disabled for everyone for the duration of the fade. See:
http://www.hiveworkshop.com/forums/cinematics-268/tips-tricks-cinema-39854/#F
Alternatively, you can use the "Advanced Fade Filter" function.
 
You would need to use a custom function:
http://www.hiveworkshop.com/forums/1676883-post6.html

The version I posted works, yes, but as WaterKnight said it won't allow players to play filters simultaneously because of the way the BJ functions were designed (they will interrupt the previous filter). The safest/most sure fire way is to use a custom function, like the one in the post I linked.
 
Status
Not open for further replies.
Top