• 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] Trigger Problem (Zoom)

Status
Not open for further replies.
Level 11
Joined
Mar 30, 2008
Messages
666
This is the trigger:
  • Sniper Zoom
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Zoom In
        • Then - Actions
          • Custom script: call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Sniper Rifle Scope", 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
          • Unit - Add Zoom Out to (Casting unit)
          • Unit - Remove (Ability being cast) from (Casting unit)
          • Unit - Set (Casting unit) movement speed to 0.00
          • Set Zoomed[(Player number of (Owner of (Casting unit)))] = True
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Zoom Out
        • Then - Actions
          • Custom script: call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0 )
          • Unit - Add Zoom In to (Casting unit)
          • Unit - Remove (Ability being cast) from (Casting unit)
          • Unit - Set (Casting unit) movement speed to (Default movement speed of (Casting unit))
          • Set Zoomed[(Player number of (Owner of (Casting unit)))] = False
        • Else - Actions
          • Do nothing
When I want to save the map,appears this error
  • call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Sniper Rifle Scope", 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
and this
  • call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0 )
What sould I do?
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
That trigger looks like one of xXx-Tricky-xXx's triggers in this map: Sniper Rifle and the function CinematicFilterGenericForPlayer is a function he made for this map so you need to add that function to your header for it to work.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Put this:


JASS:
function CinematicFilterGenericForPlayer takes player whichPlayer, real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
    if ( GetLocalPlayer() == whichPlayer ) then
        call SetCineFilterTexture(tex)
        call SetCineFilterBlendMode(bmode)
        call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
        call SetCineFilterStartUV(0, 0, 1, 1)
        call SetCineFilterEndUV(0, 0, 1, 1)
        call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
        call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
        call SetCineFilterDuration(duration)
        call DisplayCineFilter(true)
    endif
endfunction
In your header.

attachment.php
 

Attachments

  • header.png
    header.png
    49.8 KB · Views: 344
Level 22
Joined
Dec 31, 2006
Messages
2,216
The colours are just the Hive's way to make it look better. And the bug is weird because it works on xXx-Tricky-xXx's map. Maybe you did something wrong another place.
 
Level 8
Joined
Jun 20, 2004
Messages
229
thread is a few days old but ill comment anyway...

looks like your trying to use the spell i put up a couple years ago, if i remember right you probably did not upload the filter to your map. there should be a sniper rifle scope.blp or something in the custom files.

as a side note... holy crap, that thing has gotten over 4000 downloads? didnt even realize it was still around. ^_^
 
Level 8
Joined
Jun 20, 2004
Messages
229
lol ghost, you sounded like a grumpy old man in that post...

im not sure exactly what you were trying to do but if your having camera trouble for the scope, i can probably help you with that. i might even be able to post the whole code on here when i get home... but it is different than what you might have seen on that spell map.
 
Status
Not open for further replies.
Top