View Single Post
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-18-2010 , 22:19   Re: Ham_Killed superceded - force death animation
Reply With Quote #9

Yes, you have 0 health and appear as dead... supercede blocks death cammera, death message, scores, money and round-end, wich is why I'm using it.

I faked the rest, even death cammera, looks normal... I'm just stuck at this animation thing...

Or maybe you need a code to visualize things:

PHP Code:
// ...
public plugin_init()
{
    
RegisterHam(Ham_killed"player""player_killed")
    
//...
}

public 
player_killed(idkiller)
{
    
// ... checks, defines, ETC !

    
if(bFakeDeath/* is true if id was the last player alive on his team */
    
{
        
entity_set_int(idEV_INT_deadflagDEAD_DYING)
        
entity_set_int(idEV_INT_solidSOLID_NOT)
        
entity_set_int(idEV_INT_iuser12/* spectator mode: chase locked */
        
entity_set_int(idEV_INT_iuser2id/* spectating: yourself */
        
entity_set_int(idEV_INT_iuser3killer/* view targeting: killer ; and voilla, the normal CS deathcam */
        
entity_set_int(idEV_INT_sequence104/* headshot sequence */
        
entity_set_float(idEV_FL_framerate1.0)

        
/* I don't know WHAT ELSE to place here so that animation plays NORMALLY */

        // other irelevant stuff...
    
}

    
// other irelevant stuff...

    
return bFakeDeath HAM_SUPERCEDE HAM_IGNORED

I don't think 8 replies were needed in order to understand one simple question.
__________________

Last edited by Hunter-Digital; 07-18-2010 at 22:27.
Hunter-Digital is offline