I'm using a system of Jass camera filter scripting so that it will function must faster than GUI. Before, I was doing this:
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
Apply a camera filter, blah blah
endif
However, this proved to have a slow frame rate and looked horrible in game. So, I moved onto this Jass system:
However, I can't seem to apply this in game.
I do:
call CamFilter( GetEnumPlayer(), 1.0, BLEND_MODE_BLEND, "Sniper Rifle.blp", 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
This does not work for me.
My knowledge of Jass is very limited, and I do not understand the "( Get Enum Player()" part of this custom script. I would like to apply the camera filter for an owner of a triggering unit, somewhat like this:
Unit begins casting an ability
Ability = Shoot
Apply camera filter for owner shoot 1
wait 0.05 seconds
Apply camera filter for owner shoot 2
(hurt units)
wait 0.05 seconds
Apply camera filter for owner normal gun
The problem with the
"if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
Apply a camera filter, blah blah
endif"
is that the camera filter doesn't change within 0.05 seconds. It waits until somewhere along 0.5 seconds.
Can someone help me?
Thanks, satient.
if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
Apply a camera filter, blah blah
endif
However, this proved to have a slow frame rate and looked horrible in game. So, I moved onto this Jass system:
JASS:
function CamFilter 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
However, I can't seem to apply this in game.
I do:
call CamFilter( GetEnumPlayer(), 1.0, BLEND_MODE_BLEND, "Sniper Rifle.blp", 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
This does not work for me.
My knowledge of Jass is very limited, and I do not understand the "( Get Enum Player()" part of this custom script. I would like to apply the camera filter for an owner of a triggering unit, somewhat like this:
Unit begins casting an ability
Ability = Shoot
Apply camera filter for owner shoot 1
wait 0.05 seconds
Apply camera filter for owner shoot 2
(hurt units)
wait 0.05 seconds
Apply camera filter for owner normal gun
The problem with the
"if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit())
Apply a camera filter, blah blah
endif"
is that the camera filter doesn't change within 0.05 seconds. It waits until somewhere along 0.5 seconds.
Can someone help me?
Thanks, satient.