• 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.

[Trigger] Fade Filter For Player Group

Status
Not open for further replies.
Level 4
Joined
Jun 22, 2009
Messages
63
Im making a spell called Blinding Flash. It's supposed to fade the screen for all players within range of th caster. But when i use it, iget flashed and it wont fade back in.(Caster also supposed to be flashed) Is it the wait or why doesent it fade in? Also does it make the screen fade for all the players instead of just caster and the unit group?

  • Blinding Flash
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blinding Flash
    • Actions
      • Set Caster_Blind = (Triggering unit)
      • Set Targets_Blind = (Units within 500.00 of (Position of Caster_Blind))
      • Unit Group - Pick every unit in Targets_Blind and do (Actions)
        • Loop - Actions
          • Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Wait 2.00 seconds
          • Cinematic - Fade in over 3.00 seconds using texture White Mask and color (0.00%, 100.00%, 100.00%) with 100.00% transparency
 
Level 4
Joined
Jan 27, 2010
Messages
133
You cannot use Wait in a unit group loop.

  • Blinding Flash
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Blinding Flash
  • Actions
    • Set Caster_Blind = (Triggering unit)
    • Set Targets_Blind = (Units within 500.00 of (Position of Caster_Blind))
    • Unit Group - Pick every unit in Targets_Blind and do (Actions)
      • Loop - Actions
        • Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    • Wait 2.00 seconds
    • Unit Group - Pick every unit in Targets_Blind and do (Actions)
      • Loop - Actions
        • Cinematic - Fade in over 3.00 seconds using texture White Mask and color (0.00%, 100.00%, 100.00%) with 100.00% transparency
Also, won't this fade for all players...?
 
Level 9
Joined
Nov 4, 2007
Messages
933
Ah GUI users, so young and full of hope, but alas your problem just can't be solved, not even with JASS, I suggest you think of a different way of going about your spell otherwise you'll be blinding all players in your game everytime this trigger activates.
 
Level 4
Joined
Jan 27, 2010
Messages
133
Is there a custom script or something for it?(Not Jass D:<)

Custom Script = JASS

Anyway, use GetLocalPlayer()
(GetLocalPlayer() causes multiplayer desyncs if used the wrong way, so be careful about it :)

  • Blinding Flash
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blinding Flash
    • Actions
      • Set Caster_Blind = (Triggering unit)
      • Set Targets_Blind = (Units within 500.00 of (Position of Caster_Blind))
      • Player Group - Clear Blind_Force
      • Unit Group - Pick every unit in Targets_Blind and do (Actions)
        • Loop - Actions
          • Player Group - Add (Owner of (Picked Unit)) to Blind_Force
      • --- ---
      • Custom Script: if IsPlayerInForce( GetLocalPlayer(), udg_Blind_Force ) then
      • Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom Script: endif
      • --- ---
      • Wait 2.00 seconds
      • --- ---
      • Custom Script: if IsPlayerInForce( GetLocalPlayer(), udg_Blind_Force ) then
      • Cinematic - Fade in over 3.00 seconds using texture White Mask and color (0.00%, 100.00%, 100.00%) with 100.00% transparency
      • Custom Script: endif
PS. I added the comments: --- --- to make it easier to read. (GUI can get so ugly some times :)
 
For it to properly fade, you must have it like this:
  • Actions
    • Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    • Wait 2.00 seconds
    • Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
It probably isn't fading in because yours is set to 100% transparency. Thus the actual mask (or well, the normal display) isn't being shown. I tested this and it works properly. Just use these functions with themerion's code and it should work properly.
 
Status
Not open for further replies.
Top