AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to set animation for player (https://forums.alliedmods.net/showthread.php?t=189615)

dias 07-09-2012 05:33

How to set animation for player
 
I have this code. But when i set this, the anim play for 1.0 second then reset to idle anim... How to set long anim for player ?

PHP Code:

public set_player_anim(entanim)
{
    if(!
pev_valid(ent))
        return
    
    
set_pev(entpev_sequenceanim)
    
set_pev(entpev_frame0.0)
    
set_pev(entpev_framerate1.0)



Arkshine 07-09-2012 06:54

Re: How to set animation for player
 
A player's animation is constantly played through CBasePlayer::SetAnimation() (idle, walk, etc.). If your purpose is to overwrite original animation, you would need to hook this function.

dias 07-09-2012 09:04

Re: How to set animation for player
 
how can i do it ?

Arkshine 07-09-2012 09:30

Re: How to set animation for player
 
Like said, hook the function, with Orpheu or Rage, and change on the fly the sequence, but you should explain what you want to do exactly, what sequence you're talking about, for what, etc etc.

meTaLiCroSS 07-09-2012 12:32

Re: How to set animation for player
 
Which sequence is?

hornet 07-09-2012 18:59

Re: How to set animation for player
 
Could look into Arkshine's prone plugin:

http://forums.alliedmods.net/showpos...6&postcount=27

dias 07-09-2012 22:56

Re: How to set animation for player
 
well. i make a zombie class for my zombie mod, when do skill -> play player skill anim for 1 ~ 5 second(s)
The Sequence(s) is 151 of 152...

@hornet:
- i don't see?

meTaLiCroSS 07-09-2012 23:06

Re: How to set animation for player
 
Quote:

Originally Posted by dias (Post 1747100)
well. i make a zombie class for my zombie mod, when do skill -> play player skill anim for 1 ~ 5 second(s)
The Sequence(s) is 151 of 152...

@hornet:
- i don't see?

As from I know a default CS model has a max of 110 sequences... provide the names of these sequences

dias 07-10-2012 04:17

Re: How to set animation for player
 
My other zombie class can play an anim over 110, but just 1 second(s) that's enough. but this new class need 5 ~ 10 second(s) :-??

meTaLiCroSS 07-10-2012 09:09

Re: How to set animation for player
 
Quote:

Originally Posted by dias (Post 1747203)
My other zombie class can play an anim over 110, but just 1 second(s) that's enough. but this new class need 5 ~ 10 second(s) :-??

But you want to play an specific animation, or do you want to play one as how you were holding a weapon like?


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

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