Raised This Month: $ Target: $400
 0% 

Forcing animation on a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-14-2006 , 00:32   Forcing animation on a player
Reply With Quote #1

I'm trying to force a player to make a sequence/animation. I've tried to hook client prethink forward (fakemeta), and change pev_sequence, pev_frame values. It doesn't seem to work (no effect). The prethink function would be something like that.
Code:
public client_prethink(id) {     if(id == g_target) {         if(is_user_alive(id) && g_frame < 20.0) {             set_pev(id, pev_sequence, 103)             set_pev(id, pev_frame, g_frame)             g_frame += 1.0             return FMRES_SUPERCEDE         }         else {             g_target = 0             g_frame = 0.0         }     }     return FMRES_IGNORED }

EDIT: Maybe I can't treat a player like a 'cycler_sprite' entity, but I couldn't guess any other way to make it.

Last edited by commonbullet; 10-14-2006 at 01:09.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-14-2006 , 01:11   Re: Forcing animation on a player
Reply With Quote #2

You could try looking at the gabenmod sma for gaben_soldier i believe.

I remember seeing an animation function in there for the bazooka.

Maybe that will help you in the right direction.
organizedKaoS is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-14-2006 , 01:15   Re: Forcing animation on a player
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?t=45757
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-14-2006 , 09:09   Re: Forcing animation on a player
Reply With Quote #4

Thank you.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
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 04:58.


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