Raised This Month: $32 Target: $400
 8% 

Player Animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OW3R
Junior Member
Join Date: Sep 2021
Old 07-28-2022 , 11:00   Player Animation
Reply With Quote #1

Code:
stock Play_Animation(index, sequence, Float:framerate = 1.0)
{
	entity_set_float(index, EV_FL_animtime, get_gametime())
	entity_set_float(index, EV_FL_frame, 0.0)
	entity_set_float(index, EV_FL_framerate,  framerate)
	entity_set_int(index, EV_INT_sequence, sequence)
}
I can set my own player animation with this stock code, but there is a problem.
When someone shoots me player animation changes to idle animation is there any way to prevent this? i just want don't set idle animation when they shoot me
OW3R is offline
OW3R
Junior Member
Join Date: Sep 2021
Old 07-28-2022 , 11:03   Re: Player Animation
Reply With Quote #2

Can player animation be adjusted without orpheu?
OW3R is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-28-2022 , 12:18   Re: Player Animation
Reply With Quote #3

PHP Code:

stock Player_SetAnimation
(iPlayeranim)
{
    
#define ACT_RANGE_ATTACK1   28
   
    // Linux extra offsets
    #define extra_offset_animating   4
    #define extra_offset_player 5
   
    // CBaseAnimating
    #define m_flFrameRate      36
    #define m_flGroundSpeed      37
    #define m_flLastEventCheck   38
    #define m_fSequenceFinished   39
    #define m_fSequenceLoops   40
   
    // CBaseMonster
    #define m_Activity      73
    #define m_IdealActivity      74
   
    // CBasePlayer
    #define m_flLastAttackTime   220
   
    
new Float:flFrameRateFloat:flGroundSpeedbool:bLoops
      
    
// Fucking Hard code value xD
    
    
lookup_sequence(iPlayer"death1"flFrameRatebLoopsflGroundSpeed)

    static 
Float:flGametimeflGametime get_gametime()

    
set_pev(iPlayerpev_frame0.0)
    
    
set_pev(iPlayerpev_framerate0.20)
    
    
set_pev(iPlayerpev_animtimeflGametime)
    
set_pev(iPlayerpev_sequenceanim)
    
set_pev(iPlayerpev_gaitsequenceanim)
   
    
set_pdata_int(iPlayerm_fSequenceLoopsbLoopsextra_offset_animating)
    
set_pdata_int(iPlayerm_fSequenceFinished0extra_offset_animating)
   
    
set_pdata_float(iPlayerm_flFrameRateflFrameRateextra_offset_animating)
    
set_pdata_float(iPlayerm_flGroundSpeedflGroundSpeedextra_offset_animating)
    
set_pdata_float(iPlayerm_flLastEventCheckflGametime extra_offset_animating)
   
    
set_pdata_int(iPlayerm_ActivityACT_RANGE_ATTACK1extra_offset_player)
    
set_pdata_int(iPlayerm_IdealActivityACT_RANGE_ATTACK1extra_offset_player)  
    
set_pdata_float(iPlayerm_flLastAttackTimeflGametime extra_offset_player)

i think the stock is redited by me , i don't have the original stock , i just got it from allied , you can use it

anim => sequence number in arguments
__________________
SED LYF !!!

Last edited by SHIELD755; 07-28-2022 at 12:19.
SHIELD755 is offline
OW3R
Junior Member
Join Date: Sep 2021
Old 07-28-2022 , 12:30   Re: Player Animation
Reply With Quote #4

ill try and let you know
OW3R is offline
OW3R
Junior Member
Join Date: Sep 2021
Old 07-28-2022 , 12:55   Re: Player Animation
Reply With Quote #5

Actually your code works, but animation not setting when someone hits me. Is there any way to prevent?
OW3R is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-08-2022 , 17:25   Re: Player Animation
Reply With Quote #6

maybe u can try with add to full pack, cause the animations and sequences of the player changes all the time, and u cant prevent this, with that forward u will need check the instance of the sequence that u need to change

Last edited by MrPickles; 08-08-2022 at 17:35.
MrPickles is offline
Reply


Thread Tools
Display Modes

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:30.


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