Page 1 of 1

Animated Scope -- Run through anim once?

Posted: Fri Dec 26, 2003 12:28 am
by Proteus
I have my animated scope, but I only want it to run through the animation once. I think it has something to do with the "blendFunc blend" but I can't figure this out. Any help will be greatly appreciated.

Posted: Fri Dec 26, 2003 2:12 am
by Proteus
Anybody?

Could you at least post some suggestions?

Posted: Fri Dec 26, 2003 8:36 am
by jv_map
Give us some time m8 :wink: I was asleep :|

Anyway could you give us just a bit more info? I don't see how a blendfunc has anything to do with an animation :?

Posted: Fri Dec 26, 2003 7:22 pm
by Proteus
Oh, h/o here's my script.

textures/hud/zoomoverlay
{
surfaceparm nolightmap
nomipmaps
nopicmip
{
clampmap textures/hud/zoomoverlay.tga
clampmap textures/hud/zoomoverlay0.tga
clampmap textures/hud/zoomoverlay1.tga
clampmap textures/hud/zoomoverlay2.tga
clampmap textures/hud/zoomoverlay3.tga
clampmap textures/hud/zoomoverlay4.tga
clampmap textures/hud/zoomoverlay5.tga
clampmap textures/hud/zoomoverlay6.tga
clampmap textures/hud/zoomoverlay7.tga
clampmap textures/hud/zoomoverlay9.tga
clampmap textures/hud/zoomoverlay10.tga
animmap 10 textures/hud/zoomoverlay.tga textures/hud/zoomoverlay0.tga textures/hud/zoomoverlay1.tga textures/hud/zoomoverlay2.tga textures/hud/zoomoverlay3.tga textures/hud/zoomoverlay4.tga textures/hud/zoomoverlay5.tga textures/hud/zoomoverlay6.tga textures/hud/zoomoverlay7.tga textures/hud/zoomoverlay9.tga textures/hud/zoomoverlay10.tga
blendFunc blend
alphaGen oneMinusVertex
rgbGen Vertex
}
}

Posted: Tue Dec 30, 2003 5:35 am
by omniscient
well i dont know if this would work but say u put something like

blendFunc blend
alphaGen oneMinusVertex
rgbGen Vertex
waitthread end
}
}
end{
animmap 1 textures/hud/zoomoverlay.tga
}

worth a shot, dought it would work though.

Posted: Fri Jan 02, 2004 11:31 am
by jv_map
In fact what Proteus posted was a shader, not a script... hence you can't use 'end' and 'waitthread' :wink:

Posted: Sun Jan 04, 2004 2:26 am
by omniscient
woops.

Posted: Wed Jan 07, 2004 6:37 am
by Random
animap is what causes the animations but it loops. Sorry i dont know of a way to stop it but you could repeat the same frame for a bit to make it look like the animation has stopped.

Posted: Thu Jan 08, 2004 2:31 am
by omniscient
well, why dont u just put another animap at the end with ur ending picture, so it loops one picture, would that work?

Posted: Thu Jan 08, 2004 3:30 pm
by bdbodger
I think someone did this once change frames in a shader . This is from the SDK docs . If you don't add a frequency and do this it may work but I don't know how you are going to know when the player uses the scope .

scriptshader( String shaderCommand, Float argument1, [ Float argument2 ] )


alias for shader command, change a specific shader parameter for the entity.
Valid shader commands are:
translation [trans_x] [trans_y] - change the texture translation
offset [offset_x] [offset_y] - change the texture offset
rotation [rot_speed] - change the texture rotation speed
frame [frame_num] - change the animated texture frame
wavebase [base] - change the base parameter of the wave function
waveamp [amp] - change the amp parameter of the wave function
wavebase [phase] - change the phase parameter of the wave function
wavefreq [freq] - change the frequency parameter of the wave function