• 🏆 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] Black on the screen [Target Abillity]

Status
Not open for further replies.
Level 23
Joined
Oct 18, 2008
Messages
937
  • Event
  • Unit casts teh speel
  • Conditions
  • ability being cast equal to duh
  • Actions
  • make screen black for owner of target of ability
  • create DummyUnit
  • make timer for dummyunit [5 + [level of speel for caster x 2.5]]
  • Event
  • Unit dies
  • Conditions
  • Unit type of dying unit = dummyunit
  • Actions
  • make screen not black for owner of dying unit
its not mui
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Trigger One:
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to YOUR ABILITY
  • Actions
    • Set Target = (Target unit of ability being cast)
    • Set Owner = (Owner of Target)
    • Custom script: if GetLocalPlayer() == udg_Owner then
    • Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
    • Custom script: endif
    • Set Dur[(Player number of Owner)] = DURATION
    • Player Group - Add Owner to PlayerGroup
Trigger Two:
  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Player Group - Pick every player in PlayerGroup and do (Actions)
      • Loop - Actions
        • Set TempPlayer = (Picked player)
        • Set Dur[(Player number of TempPlayer)] = (Dur[(Player number of TempPlayer)] - 0.10)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Dur[(Player number of TempPlayer)] Less than or equal to 0.00
          • Then - Actions
            • Custom script: if GetLocalPlayer() == udg_Owner then
            • Cinematic - Fade in over 0.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
            • Custom script: endif
            • Player Group - Remove TempPlayer from PlayerGroup
          • Else - Actions
 
Here it is:
  • Black Mask
    • Events
    • Conditions
    • Actions
      • Cinematic - Fade in over 0.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
Remember, you have to fade it out, too ;)

EDIT: TRD posted a much more explained way above at the same time I posted mine xD See his ;)
 
That is not the best way way to do it. THIS is the way to do it - MUI and really simple:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your Ability>
    • Actions
      • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetSpellTargetUnit()) then
      • Cinematic - Fade out and back in over (2.50 + (2.50 x (Real((Level of <Your Ability> for (Triggering unit)))))) seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: endif
Just replace <Your Ability> with, well, your ability :p
 
Level 6
Joined
Apr 24, 2008
Messages
174
Or, you make an Event that the unit cast the ability ETC ETC, then create this action:

Player Group - Pick every player in (Player group((Owner of (Target unit of ability being cast)))) and do (Actions)
Loop - Actions
Environment - Set fog to style Linear, z-start 10000000000.00, z-end 10000000000.00, density 0.00 and color (0.00%, 0.00%. 0.00%)
 
Ok, but how to do so the unit can't attack during it's blinded? Can you disable the attack like the banish abillity or how to do, add it to this trigger:

  • Obscuro Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Obscuro
    • Actions
      • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetSpellTargetUnit()) then
      • Cinematic - Fade out over 0.25 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait (2.50 + (2.50 + (Real((Level of Obscuro for (Triggering unit)))))) seconds
      • Cinematic - Fade in over 0.25 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: endif
 
That trigger will cause your map to desync - you need to put endif after the first fade out and then put the if GetLocalPlayer() == GetOwningPlayer(GetSpellTargetUnit()) again before fading in (and you need endif again after fading in). To make the unit not able to attack? I think a better solution would be to give it a 100% miss chance. For that, just make a dummy unit cast modified curse on it.
 
Ah, didn't know that... so this is the full trigger:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your ability>
    • Actions
      • Custom script: local player p = GetOwningPlayer(GetSpellTargetUnit())
      • Custom script: if GetLocalPlayer() == p then
      • Cinematic - Fade out over 0.25 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: endif
      • Wait (2.50 + (2.50 x (Real((Level of <Your ability> for (Triggering unit)))))) seconds
      • Custom script: if GetLocalPlayer() == p then
      • Cinematic - Fade in over 0.25 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Custom script: endif
      • Custom script: set p = null
 
A desync is when a player "desynchronises" with the host - in other words, the game on the player's computer is at a different point to the game on the host's computer. This can cause "game splits" - where there are effectively 2 games running at once - or disconnection.

And how to make a dummy unit cast modified curse on it? Well...

1. Go into the object editor and create a custom ability based off curse. Reduce the mana cost to 0 and change the chance to miss to 100%. Also make it have 3 levels with different durations - 5.00, 7.50 and 10.00.

2. Create your dummy unit - this is basically a unit with a tiny scale size. Add your new curse ability to it, and also add the ability "locust" so it can't be selected.

3. In your trigger, create a dummy unit at the position of the target.

4. Set the level of your curse ability for the dummy equal to the level of the spell for the caster.

5. Order the dummy to Undead Banshee - Curse the target of the spell.

6. Add an expiration timer to the dummy unit with a duration of 0.5 seconds.

EDIT:
Ah, Mephisto, I do believe you have an easier option... ignore the above instructions, just make the base ability for your spell curse with 100% miss chance :D
 
Status
Not open for further replies.
Top