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

[SOLVED] ACT_RANGE_ATTACK1 Activity - Playing Animation


Post New Thread Reply   
 
Thread Tools Display Modes
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-14-2013 , 20:12   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #11

Quote:
Originally Posted by fearAR View Post
Thanks meTaLiCroSS.

Any solution for my doubt?
You're asking for an idle animation, or calling your own animation? Remeber that you can see them on every model using a model viewer, when holding a weapon, the "ref_aim_*" animation it's the one that is executed, and when firing, the same but instead of "ref_aim_*" is "ref_shoot_*" which * = m_szAnimExtention value.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
fearAR
Veteran Member
Join Date: Oct 2010
Old 01-14-2013 , 20:55   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #12

I'm making a plugin where player can take a defensive position with the knife, It can be achieved if he press IN_ATTACK2 button, so, If he press this button, I need to set an animation to player where he is standing like he is in a defensive position, and I was thinking on name the animation like:

"ref_shoot_defense", So I could set m_szAnimExtention to "defense" and call SetAnimation function with Orpheu. But I'm looking for a different way where I could set an animation without interfere with walk, crouch, swim, animations, like the animation only affects the head and arms of the body, Is it possible?
( Of course, that, with the value of m_szAnimExtention it is possible, but I want a different way, without use it ).
__________________
~~~~ NPC AI ~~~~

[ Pathfinding - OK ]
[ Citizen AI - OK ]
[ Handle Weapons - --- ]

Last edited by fearAR; 01-14-2013 at 20:55.
fearAR is offline
Send a message via MSN to fearAR
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-14-2013 , 21:22   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #13

If you use SetAnimation, it won't interfere with Walk and such. gaitsequence is always set at the end of function anyway.
__________________
Arkshine is offline
fearAR
Veteran Member
Join Date: Oct 2010
Old 01-14-2013 , 22:29   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #14

So, If I add a new animation to a model, and the number of this animation is 96.

If I do this:

PHP Code:
OrpheuCallOrpheuGetFunction"SetAnimation""CBasePlayer" ), id96 ); 
Will it work?

Greetings.

Edit: I tested and It didn't worked, or are you referring to use m_szAnimExtention and pass an event PLAYER_* to the SetAnimation function's 2nd param?
__________________
~~~~ NPC AI ~~~~

[ Pathfinding - OK ]
[ Citizen AI - OK ]
[ Handle Weapons - --- ]

Last edited by fearAR; 01-14-2013 at 22:35.
fearAR is offline
Send a message via MSN to fearAR
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-14-2013 , 22:50   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #15

Quote:
Originally Posted by fearAR View Post
So, If I add a new animation to a model, and the number of this animation is 96.

If I do this:

PHP Code:
OrpheuCallOrpheuGetFunction"SetAnimation""CBasePlayer" ), id96 ); 
Will it work?

Greetings.

Edit: I tested and It didn't worked, or are you referring to use m_szAnimExtention and pass an event PLAYER_* to the SetAnimation function's 2nd param?
SetAnimation it's called every frame, you don't need to set it again, just change the offset when press +attack2 and rewrite the offset again with "knife" when not, just one time, you'll see the change.

Also, SetAnimation doesn't call an animation listed on the model, it haves his respectives enumerations. Add the ref_aim_defense at the end of the model (I suppose you know) and do the thing that i've wrote you above
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
fearAR
Veteran Member
Join Date: Oct 2010
Old 01-14-2013 , 23:07   Re: ACT_RANGE_ATTACK1 Activity - Playing Animation
Reply With Quote #16

I know that SetAnimation param, is related to an enumeration, for that reason I was confused, so If there isn't other way to do this, I'll have to take use of m_szAnimExtention.

Please close this thread, thanks to all the persons who tried and helped me.

Greetings.
__________________
~~~~ NPC AI ~~~~

[ Pathfinding - OK ]
[ Citizen AI - OK ]
[ Handle Weapons - --- ]
fearAR is offline
Send a message via MSN to fearAR
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 15:09.


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