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

[CS:GO] Animating a player model entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bakuryu
Member
Join Date: Dec 2011
Old 09-25-2016 , 19:26   [CS:GO] Animating a player model entity
Reply With Quote #1

I was able to spawn a player model as an prop_dynamic, but I cannot get it to animated using

Code:
    SetVariantString("testWalkN");
    AcceptEntityInput(EntIndex , "SetAnimation", -1, -1, 0);
Here is the full script (minus the on start)

Code:
public Action OnRoundStart(Event event, const char[] name, bool dontBroadcast)
{
    char model[128];
    GetClientModel(1, model, 128);
    
    int EntIndex = CreateEntityByName("prop_dynamic");
    SetEntityModel(EntIndex,model);
    DispatchSpawn(EntIndex);
    SetVariantString("testWalkN");
    AcceptEntityInput(EntIndex , "SetAnimation", -1, -1, 0); 
    
    float hOrigin[3];
    GetClientAbsOrigin(1, hOrigin);
    TeleportEntity(EntIndex, hOrigin, NULL_VECTOR, NULL_VECTOR);  
    PrintToChatAll(model);
}
The model shows up, but it doesn't move. If I use ent_fire on it in game it also doesn't work, although if I set it to ragdoll it does lay flat instead of being in the default position.
Bakuryu is offline
 



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 09:31.


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