Raised This Month: $51 Target: $400
 12% 

SetAnimation reset


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hitmany
Senior Member
Join Date: Jul 2010
Old 10-24-2018 , 17:59   SetAnimation reset
Reply With Quote #1

Hello, I trying apply animation for chicken. But I cant reset this animation

How to reset SetAnimation?

I tried SetAnimationNoReset, SetDefAnimation. When I apply "idle" animation chicken wont move and follow me

PHP Code:
if ((chicken CreateEntityByName("chicken")) != -1)
{
  
DispatchKeyValue(chicken "targetname""chicken_controlled");
  
DispatchSpawn(chicken);
  
TeleportEntity(chickenChickenCoordNULL_VECTORNULL_VECTOR);
  
ActivateEntity(chicken);
}

new 
Float:client_pos[3], Float:start_pos[3];
GetClientAbsOrigin(client,client_pos);
GetEntPropVector(chickenProp_Send"m_vecOrigin"start_pos);
new 
Float:dist_check=GetVectorDistance(client_pos,start_pos);
if(
dist_check<100.0)
{
    
SetVariantString("flap"); 
    
AcceptEntityInput(chicken"SetAnimation");  
    
inanim=1;
}
else
{
    if(
inanim)
    {
        
SetVariantString("idle"); 
        
AcceptEntityInput(chicken"SetAnimation");  
        
inanim=0;
    }


Last edited by hitmany; 10-24-2018 at 18:03.
hitmany is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode