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

fade out screen and sway camera for local player

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hi would it be posible to fade out screen and fade camera for local player? what i am trying is to create a custom spell that makes damages event target's screen black and his camera swaying it is supossed to be a simulation of getting hited in the head.

so far my trigger looks like that, i am using the damage engine by birbe. the main issue with my trigger is that it makes other players desync. i am sure it does because i tested my map today with other players and as soon as it hapenned player who received sway camera +fade out got dced from game.why does it desync? how can i fix it i was sure the actions that are being executed work localy and should not desync.



  • BlackScreen
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Strong Troll
      • (Level of right flank (Icon) for DamageEventSource) Equal to 1
      • DisallowBlackScreen Equal to False
    • Actions
      • Set VariableSet TempInt = (Random integer number between 1 and 8)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Equal to 8
        • Then - Actions
          • Trigger - Turn off BlackScreen <gen>
          • Set VariableSet DisallowBlackScreen = True
          • Unit - Remove right flank (Icon) from DamageEventSource
          • Countdown Timer - Start shelobiksFred as a One-shot timer that will expire in 3.00 seconds
          • Custom script: set udg_LocalPlayer = GetLocalPlayer()
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LocalPlayer Equal to (Owner of DamageEventTarget)
            • Then - Actions
              • Cinematic - Fade out and back in over 3.00 seconds using texture Panda-n-Cub and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
              • Camera - Sway the camera target for (Owner of (Triggering unit)) with magnitude 1300.00 and velocity 70.00
            • Else - Actions
        • Else - Actions
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,595
The answer is in your thread from a couple years ago:

Keep in mind that the solution posted above only works for fading out, the other two fade types call FinishCinematicFadeAfterBJ, which creates a timer, so doing that in a local context will desync.

Some more info on the topic

If you're on a more recent version (1.31+) you could probably use custom frames to mimic the effects of a fade out/fade in without having to worry about desyncs. But swaying the camera without desyncs may be impossible.
 
Last edited:
Status
Not open for further replies.
Top