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

[Trigger] Using a local fade filter?

Status
Not open for further replies.
Level 6
Joined
Dec 23, 2008
Messages
82
  • Show Scope
  • Events
  • Unit - A unit Begins channeling an ability
  • Conditions
  • (Ability being cast) Equal to Scope [A]
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (PlayersSurvivor[(Player number of (Owner of (Triggering unit)))] is alive) Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ScopeOn[(Player number of (Owner of (Triggering unit)))] Equal to False
        • Then - Actions
          • Cinematic - Fade out over 0.50 seconds using texture war3mapImported\GunAim_Moon_assailant_A_004.tga and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Set ScopeOn[(Player number of (Owner of (Triggering unit)))] = True
          • Set AngledTurned[(Player number of (Owner of (Triggering unit)))] = 3.50
        • Else - Actions
          • Cinematic - Fade in over 0.50 seconds using texture war3mapImported\GunAim_Moon_assailant_A_004.tga and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Set ScopeOn[(Player number of (Owner of (Triggering unit)))] = False
          • Set AngledTurned[(Player number of (Owner of (Triggering unit)))] = 8.25
          • Set AngleOfAttack[(Player number of (Owner of (Triggering unit)))] = -5.00
    • Else - Actions
where the fade filter takes place, does any1 know how to make it where it only affects the owner of the triggering unit, if so, could you please show me the code for it.
 
Level 6
Joined
Dec 23, 2008
Messages
82
Try this..

  • Then - Actions
    • Custom Script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    • Cinematic - Fade out over 0.50 seconds using texture war3mapImported\GunAim_Moon_assailant_A_004.tga and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    • Custom Script: endif
Might cause desyncs, might aswell try it.
no no no.. thats not what i meant.. like, whenever the player casts the spell, itll show the scope on their screen only. and when another player casts the spell, itll do the same. but since the others players didnt cast the spell, it wont appear on the screen.
 
Level 12
Joined
Dec 10, 2008
Messages
850
It would only show as long as it was the triggering player, but that would be every time, for every player, since the function doesn't take a player. If you could change the RRGGBB values for the triggering player though, then thats a diffrent story.
 
Level 13
Joined
Mar 16, 2008
Messages
941
What are you talking about? He never used GetTriggeringPlayer() but GetOwningPlayer(GetTriggerUnit()) and that is only the owner of the filter.
This hastowork, but it will cause desyncs. You aren't allowed to crate filters locally. You have to create them for allplayers, hide it for all players and then show it for the local one.
 
Level 6
Joined
Dec 23, 2008
Messages
82
  • Part of trigger:
  • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
  • Cinematic - Fade out over 0.50 seconds using texture war3mapImported\GunAim_Moon_assailant_A_004.tga and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
  • Custom script: endif
whenever i tried it this way, it didnt work. it was still shown on the other players screen.
@Darkt3mpl3r, i am going to try your method

edit: @Darkt3mpl3r, thank you so much :DD it finally works :) +rep!!
 
Last edited:
Level 4
Joined
Sep 28, 2016
Messages
47
What are you talking about? He never used GetTriggeringPlayer() but GetOwningPlayer(GetTriggerUnit()) and that is only the owner of the filter.
This hastowork, but it will cause desyncs. You aren't allowed to crate filters locally. You have to create them for allplayers, hide it for all players and then show it for the local one.

Hi Justify. May I ask, does this include the fading IN of said filter? (not just fading out?) Do you need to create the fade in, hide the fade in, then show it only for local player?

This does kind of work, but it only ever works for one player at a time (when both units trigger it at almost the same period of time). Could this be a problem based on my method of testing? I'm using JNGP multiplayer emulation to test it. Perhaps detecting local player isn't so simple when you're running two warcrafts.
 
Status
Not open for further replies.
Top