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

[Trigger] Filter problem ...

Status
Not open for further replies.
Level 9
Joined
Jan 23, 2008
Messages
384
Ok ... this trigger is supposed to add a fade filter to a player if one of the matching player's unit enters within range of a unit ... it all works fine ! but when the unit gets rid of the buff, in the last part of the trigger, the player owning the unit is kicked out of the game ... can someone help me out with this one ?

  • Bankai Szu Act
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EnmaBankai and do (Actions)
        • Loop - Actions
          • Set EnmaBankaiPickedDummy = (Picked unit)
          • Set EnmaIntLvl = (Load (Key Level) of (Key (Picked unit)) from Hst)
          • Unit Group - Pick every unit in (Units within 650.00 of (Position of (Load (Key Dome) of (Key (Picked unit)) in Hst)) matching ((((Matching unit) belongs to an enemy of (Owner of (Load (Key Dome) of (Key (Picked unit)) in Hst))) Equal to True) and (((Matching unit) is alive) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to EnmaBankaiTargets
              • Unit - Create 1 Dummy for (Owner of EnmaBankaiPickedDummy) at (Position of EnmaBankaiPickedDummy) facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add (Suzumushi) to (Last created unit)
              • Unit - Set level of (Suzumushi) for (Last created unit) to EnmaIntLvl
              • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
      • Unit Group - Pick every unit in EnmaBankaiTargets and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enma Korogi ) Equal to True
              • ((Picked unit) is in EnmaBankaiTargetsAfterEffect) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargets
              • Unit Group - Add (Picked unit) to EnmaBankaiTargetsAfterEffect
              • Custom script: if (GetLocalPlayer()==GetOwningPlayer(GetEnumUnit())) then
              • Custom script: call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 0.05, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
              • Custom script: endif
            • Else - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargets
      • Unit Group - Pick every unit in EnmaBankaiTargetsAfterEffect and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enma Korogi ) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargetsAfterEffect
              • Custom script: if (GetLocalPlayer()==GetOwningPlayer(GetEnumUnit())) then
              • Custom script: call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 0.10, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
              • Custom script: endif
            • Else - Actions

TY !

~MA
 
No the problem is not that it runs endlessly the trigger works fine but the fade filter kills it ... i changed it like this works perfectly again but still kicks out the player ... no BJ in it this time ... some help ?
  • Bankai Szu Act
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EnmaBankai and do (Actions)
        • Loop - Actions
          • Set EnmaBankaiPickedDummy = (Picked unit)
          • Set EnmaIntLvl = (Load (Key Level) of (Key (Picked unit)) from Hst)
          • Unit Group - Pick every unit in (Units within 650.00 of (Position of (Load (Key Dome) of (Key (Picked unit)) in Hst)) matching ((((Matching unit) belongs to an enemy of (Owner of (Load (Key Dome) of (Key (Picked unit)) in Hst))) Equal to True) and (((Matching unit) is alive) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to EnmaBankaiTargets
              • Unit - Create 1 Dummy for (Owner of EnmaBankaiPickedDummy) at (Position of EnmaBankaiPickedDummy) facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add (Suzumushi) to (Last created unit)
              • Unit - Set level of (Suzumushi) for (Last created unit) to EnmaIntLvl
              • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
      • Unit Group - Pick every unit in EnmaBankaiTargets and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enma Korogi ) Equal to True
              • ((Picked unit) is in EnmaBankaiTargetsAfterEffect) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargets
              • Unit Group - Add (Picked unit) to EnmaBankaiTargetsAfterEffect
              • Custom script: if (GetLocalPlayer()==GetOwningPlayer(GetEnumUnit())) then
              • Cinematic - Fade out over 0.05 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
              • Custom script: endif
            • Else - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargets
      • Unit Group - Pick every unit in EnmaBankaiTargetsAfterEffect and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enma Korogi ) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from EnmaBankaiTargetsAfterEffect
              • Custom script: if (GetLocalPlayer()==GetOwningPlayer(GetEnumUnit())) then
              • Cinematic - Fade in over 0.05 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
              • Custom script: endif
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnmaBankai is empty) Equal to True
          • (EnmaBankaiTargets is empty) Equal to True
          • (EnmaBankaiTargetsAfterEffect is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
~MA
 
LocalPlayer is the reason.
*Probably* trying to get owner of enum unit causes the users to desync. I'm not an expert on that matter, but I would say that each computer picks units in a different order, which causes those computers to get ridiculous results, like sometimes getting two local players out of unit that should have returned one. But that's just theory, you would need to ask someone more experienced.

Also, you've got few leaks there.
 
Nah, not in this case. The leaking here is realitvely small compared to a trigger that runs on very short periods (like 0.02 sec), so i doubt it would affect it in any way.
Besides, the leaks are not even involved in the group actions in which the local player check is.
 
Allright, I've read a bit about local player and i think i've found a solution, tho I haven't tested it so i have no idea whether it'll still desync or not. But from what i've read, it shouldn't.

Just create an integer variable and store number of player in it, just like in example below. If you want a different name for your variable, just change "integer" in the custom script to its name, but dont remove the "udg_" or it will screw up. And don't touch the " - 1", it's supposed to be here.
  • Set integer = Player number of (Owner of(Picked unit))
  • Custom script: if (GetLocalPlayer()==Player(udg_integer - 1)) then
  • Cinematic - Fade out over 0.05 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
  • Custom script: endif
Edit; also, a fade in/out over 0.05 sec? Is this even noticeable?
 
Last edited:
Status
Not open for further replies.
Back
Top