Can you stop sprite animation on a certian frame in SourceMod? If i remember correctly there was something like this in AMX
Or just to set the starting frame to some value, so i can just destroy previous env_sprite on frame X and create new one that has framerate=0 and is starting on frame X
My code:
Code:
int iEntitySprite = CreateEntityByName("env_sprite");
if (iEntitySprite && IsValidEntity(iEntitySprite))
{
DispatchKeyValue(iEntitySprite, "model", "materials/healthbarsprites/health_green.vmt");
DispatchKeyValue(iEntitySprite, "classname", "health_bar");
DispatchKeyValue(iEntitySprite, "framerate", "10");
DispatchKeyValue(iEntitySprite, "spawnflags", "1");
DispatchKeyValue(iEntitySprite, "scale", "1.0");
DispatchKeyValue(iEntitySprite, "rendermode", "1");
DispatchSpawn(iEntitySprite);
TeleportEntity(iEntitySprite, fClientOrigin, NULL_VECTOR, NULL_VECTOR);
SetVariantString(iEntityTarget);
AcceptEntityInput(iEntitySprite, "SetParent", iEntitySprite, iEntitySprite, 0);
AcceptEntityInput(iEntitySprite, "ShowSprite");
}
And the vmt:
Code:
"UnlitGeneric"
{
"$receiveflashlight" 0
"$singlepassflashlight" 0
"$basetexture" "health_green"
"$alphatest" 1
"$translucent" 1
"$vertexalpha" 1
"$vertexcolor" 1
"$framerate" 60.0
}
In here
https://developer.valvesoftware.com/wiki/Env_sprite There are some KeyValues like "Starting Frame" but that does not seem to work
Any tips how can i solve my problem?