Left 4 Dead 2

Left 4 Dead 2

View Stats:
Sawapine Sep 25, 2017 @ 9:54pm
Looping texture animation
Guys, I need help!
Who knows how to set the beginning and end of the animated texture so that it does not repeat?
< >
Showing 1-10 of 10 comments
Rectus Sep 26, 2017 @ 2:25am 
It can be done by changing out the animation material proxy for MaterialModifyAnimated, and then using a material_modify_control entity to trigger the animation with looping disabled.

https://developer.valvesoftware.com/wiki/List_Of_Material_Proxies#Entity_integration
https://developer.valvesoftware.com/wiki/Material_modify_control
Sawapine Sep 26, 2017 @ 3:07am 
Can you show me how it will be look in the code, please?
Originally posted by Rectus:
It can be done by changing out the animation material proxy for MaterialModifyAnimated, and then using a material_modify_control entity to trigger the animation with looping disabled.

https://developer.valvesoftware.com/wiki/List_Of_Material_Proxies#Entity_integration
https://developer.valvesoftware.com/wiki/Material_modify_control
Rectus Sep 26, 2017 @ 3:15am 
If you already have an animated material, it should be as easy as switching out AnimatedTexture for MaterialModifyAnimated.

I Hammer, you need to trigger the StartAnimSequence input on the material_modify_control with the parameter ovveride set to the list of settings in the wiki.
Last edited by Rectus; Sep 26, 2017 @ 3:29am
Sawapine Sep 26, 2017 @ 5:49am 
I did that, but the texture still looping. Maybe i do something wrong. (
//------------------------------------
"Proxies"
{
"MaterialModifyAnimated"
{
"animatedtexturevar" "$basetexture"
"animatedtextureframenumvar" "$frame"
"animatedtextureframerate" "16"
}
}
}
//------------------------------------
Originally posted by Rectus:
If you already have an animated material, it should be as easy as switching out AnimatedTexture for MaterialModifyAnimated.

I Hammer, you need to trigger the StartAnimSequence input on the material_modify_control with the parameter ovveride set to the list of settings in the wiki.
Rectus Sep 26, 2017 @ 6:01am 
How is your material_modify_control set up?
Sawapine Sep 26, 2017 @ 7:30am 
I don't know where and how correctly should I write it.
Originally posted by Rectus:
How is your material_modify_control set up?
Rectus Sep 26, 2017 @ 7:41am 
So you've placed one in Hammer, right? The next step is to set the Material to modify keyvalue to your material, and then firing the StartAnimSequence input from whatever you want to trigger the animation from.
Sawapine Sep 26, 2017 @ 8:03am 
I don't use the Hammer. I've already animated texture *.vtf file and I just uploaded This mod in Workshop. But I only need to start on the first and stop on the last frame that animation. (
@
Here the full code of the my *.vmt file:
//---------------------------------------
"UnlitGeneric"
{
"$basetexture" "vgui/common/death_screen"
"$translucent" 1

"Proxies"
{
"MaterialModifyAnimated"
{
"animatedtexturevar" "$basetexture"
"animatedtextureframenumvar" "$frame"
"animatedtextureframerate" "16"
}
}

}
//---------------------------------------
Please, can you write all the needed functions?
Last edited by Sawapine; Sep 26, 2017 @ 8:06am
Rectus Sep 26, 2017 @ 8:20am 
Oh sorry, I thought you were making it for a map. Doing it with matreial proxies only might be possible, not fully sure though. Something like this could probably work, although it's possible it gets played before the player has a chance to see it:

"UnlitGeneric" { "$basetexture" "vgui/common/death_screen" "$translucent" 1 "$frame" 0 "Proxies" { "LinearRamp" { "rate" 1 // Animation speed goes here "initialValue" 0 "resultVar" "$frame" } "Clamp" { "min" 0 "max" 16 // Number of frames + 1 goes here "srcVar1" "$frame" "resultVar" "$frame" } } }
Sawapine Sep 26, 2017 @ 8:40am 
Thank you very much for help, bro! Now I probably know that it's impossible to stop looping of this kind of animated texture.)
Last edited by Sawapine; Sep 26, 2017 @ 8:41am
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Sep 25, 2017 @ 9:54pm
Posts: 10