Raised This Month: $ Target: $400
 0% 

Fake Death - Setting animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
uxMal
Member
Join Date: Oct 2007
Old 10-13-2009 , 08:47   Fake Death - Setting animation
Reply With Quote #1

Hi,

im trying to fake a death of a player...

It's knida working now but sometimes the animation is played twice or does not fit correctly (if you see the code you know why )

Code:
//ham_killed
set_pev(id,pev_gaitsequence,102);
set_task(1.0,"anim",id+TASK_ANIM);

public anim(id) {
    id -= TASK_ANIM;
    set_pev(id,pev_sequence,102);
}
Any ideas how to set the animations to fake a death correctly?
uxMal is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2009 , 11:28   Re: Fake Death - Setting animation
Reply With Quote #2

//ham_killed

You say it's played twice but it makes sense since your code is in Ham_Killed where the death animation will be done.
__________________
Arkshine is offline
uxMal
Member
Join Date: Oct 2007
Old 10-13-2009 , 11:35   Re: Fake Death - Setting animation
Reply With Quote #3

Sorry, haven't posted the whole code

im blocking death with HAM_SUPERCEDE and playing the death animation to fake a death after some time the player can stand up again...

But if i just block the death the model still stands there
uxMal is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2009 , 11:36   Re: Fake Death - Setting animation
Reply With Quote #4

Ham_Killed is registered as pre, right ?
__________________
Arkshine is offline
uxMal
Member
Join Date: Oct 2007
Old 10-13-2009 , 11:37   Re: Fake Death - Setting animation
Reply With Quote #5

Yes, sure..
uxMal is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-13-2009 , 12:28   Re: Fake Death - Setting animation
Reply With Quote #6

Try to play with those 2 offsets :

73 - m_Activity
74 - m_IdealActivity
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
uxMal
Member
Join Date: Oct 2007
Old 10-21-2009 , 11:15   Re: Fake Death - Setting animation
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Try to play with those 2 offsets :

73 - m_Activity
74 - m_IdealActivity
Thanks for the advice but this didn't change much, it's still kinda random ...
uxMal is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-21-2009 , 11:16   Re: Fake Death - Setting animation
Reply With Quote #8

You could make the player invisible, spawn a new ent, set its model to the player's current model, then play the death sequence on it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 22:35.


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