AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fake Death - Setting animation (https://forums.alliedmods.net/showthread.php?t=106272)

uxMal 10-13-2009 08:47

Fake Death - Setting animation
 
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 :D)

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?

Arkshine 10-13-2009 11:28

Re: Fake Death - Setting animation
 
//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.

uxMal 10-13-2009 11:35

Re: Fake Death - Setting animation
 
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

Arkshine 10-13-2009 11:36

Re: Fake Death - Setting animation
 
Ham_Killed is registered as pre, right ?

uxMal 10-13-2009 11:37

Re: Fake Death - Setting animation
 
Yes, sure..

ConnorMcLeod 10-13-2009 12:28

Re: Fake Death - Setting animation
 
Try to play with those 2 offsets :

73 - m_Activity
74 - m_IdealActivity

uxMal 10-21-2009 11:15

Re: Fake Death - Setting animation
 
Quote:

Originally Posted by ConnorMcLeod (Post 960830)
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 ...

Hawk552 10-21-2009 11:16

Re: Fake Death - Setting animation
 
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.


All times are GMT -4. The time now is 22:35.

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