Animated Scope -- Run through anim once?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Proteus
Private
Posts: 3
Joined: Fri Dec 26, 2003 12:27 am
Location: Plymouth, MA
Contact:

Animated Scope -- Run through anim once?

Post 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.
Proteus
Private
Posts: 3
Joined: Fri Dec 26, 2003 12:27 am
Location: Plymouth, MA
Contact:

Post by Proteus »

Anybody?

Could you at least post some suggestions?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 :?
Image
Proteus
Private
Posts: 3
Joined: Fri Dec 26, 2003 12:27 am
Location: Plymouth, MA
Contact:

Post 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
}
}
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post 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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

In fact what Proteus posted was a shader, not a script... hence you can't use 'end' and 'waitthread' :wink:
Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

woops.
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post 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.
Moderator
Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post 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?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Post Reply