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

[TF2/ANY?] Problem with animations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 07-18-2018 , 18:34   [TF2/ANY?] Problem with animations
Reply With Quote #1

Hey guys, I need some help with animations. Actually what I want to do is to create a prop_dynamic with the scout model for example and to copy animations of the client, the prop will imitate his animations. The problem is that I dont know how to get animations from a client and set it to an entity, if anyone can help me ^^
__________________
My Steam I take private requests if related with TF2
My Plugins
Facksy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-19-2018 , 06:51   Re: [TF2/ANY?] Problem with animations
Reply With Quote #2

Couldn't you just use a plugin that runs the bot_mirror and bot_mimic commands on a specific player index?
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-19-2018 at 06:52.
Powerlord is offline
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 07-19-2018 , 08:31   Re: [TF2/ANY?] Problem with animations
Reply With Quote #3

Not really, because my goal here is to parent these props to the client, to make them not solid and to make them appears only on some animations

EDIT: I think i know how i can set the animation to the prop with AcceptEntityInput(ent, "SetAnimation");
All i need is to get the name of this animation or this sequence, "m_nSequence" replies an int but me I need a string
__________________
My Steam I take private requests if related with TF2
My Plugins

Last edited by Facksy; 07-19-2018 at 09:37.
Facksy is offline
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 07-19-2018 , 15:17   Re: [TF2/ANY?] Problem with animations
Reply With Quote #4

Found this:
PHP Code:
#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    
AddTempEntHook("PlayerAnimEvent"OnPlayerAnimEvent);
    
    
RegConsoleCmd("test_playeranimevent"Command_TestPlayerAnimEvent);
}

public 
Action:OnPlayerAnimEvent(const String:te_name[], const Players[], numClientsFloat:delay)
{
    new 
client    TE_ReadNum("m_hPlayer");
    new 
event    TE_ReadNum("m_iEvent");
    new 
data    TE_ReadNum("m_nData");
    
    
PrintToChatAll("AnimEvent: Player: %i, Event: %i, Data: %i"clienteventdata);
}

public 
Action:Command_TestPlayerAnimEvent(clientargs)
{
    
decl String:arg1[64], String:arg2[64], String:arg3[64];
    
    
GetCmdArg(1arg1sizeof(arg1));
    
GetCmdArg(2arg2sizeof(arg2));
    
GetCmdArg(3arg3sizeof(arg3));
    
    
TE_Start("PlayerAnimEvent");
    
    
TE_WriteNum("m_hPlayer"StringToInt(arg1));
    
TE_WriteNum("m_iEvent"StringToInt(arg2));
    
TE_WriteNum("m_nData"StringToInt(arg3));
    
    
TE_SendToAll();

But I dont know what parameter should i put after "test_playeranimevent", someone knows?
from this thread
__________________
My Steam I take private requests if related with TF2
My Plugins
Facksy 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 11:23.


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