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

Ham_Killed superceded - force death animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-17-2010 , 21:41   Ham_Killed superceded - force death animation
Reply With Quote #1

I'm hooking Ham_Killed and returning HAM_SUPERCEDE and I noticed that the animation is frozen.

If I force EV_INT_sequence on the player, sometimes it's just fast-forwarded to the final frame, sometimes it's fast forwarded to half-frames and freezes in mid-air.

I tried EV_FL_framerate, then EV_FL_frame, later on I tried EV_FL_animtime, and they just weirded things more...

So, how should I "play" a death animation cancelling all other influences ?
__________________

Last edited by Hunter-Digital; 07-17-2010 at 21:44.
Hunter-Digital is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2010 , 23:30   Re: Ham_Killed superceded - force death animation
Reply With Quote #2

You are trying to block a death yet the player has zero health and therefore puts him in limbo.
__________________
fysiks is online now
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-17-2010 , 23:57   Re: Ham_Killed superceded - force death animation
Reply With Quote #3

Yes I know that, I said I forced a death sequence on him, but how do I properly play it ?
__________________
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-18-2010 , 02:22   Re: Ham_Killed superceded - force death animation
Reply With Quote #4

I guess you need to block CBasePlayer::SetAnimation(), then playing your wanted animation.
__________________
Arkshine is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 07-18-2010 , 14:01   Re: Ham_Killed superceded - force death animation
Reply With Quote #5

Can't u hook damage event, check if hes health goes to 0 or below, if so u supercede the damage.
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-18-2010 , 14:04   Re: Ham_Killed superceded - force death animation
Reply With Quote #6

You aim something complicated when you could easily with orpheu.
__________________
Arkshine is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-18-2010 , 19:18   Re: Ham_Killed superceded - force death animation
Reply With Quote #7

I have absolutely no experience with orpheu and I kinda refuse to understand it at the moment :} so no thanks This happened when ham was first released too I didn't want to hear about it but now, I'ved slowly learned it and it's ok ... so, when orpheu's time comes, I'll use it, until then...


And no, grimvh2, I don't need to hook damage event and supercede damage because I need the player to actually die... if I supercede death, it does what I want... death but not really death :} I just need to fake the rest, scores, money and deathmessage already done, all it's left is the player's death animation... wich I can't figure out how to use.

The player in dying mode is like any entity with some pre-set animation (wrong one) on it... how would you completly overwrite that sequence ?

Oh, did I mention I really have no ideea how are frame, animtime and framerate used ? I don't :} framerate I thought it was the actual framerate, then I found out it was a percentage of the actual model's framerate (1.0 == normal model FPS), frame... it's the model's current (or starting ?) frame number... I don't know any other use of that... and animtime I don't know, it's it just a float, or gametime + time.. or wth :-?
__________________
Hunter-Digital is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-18-2010 , 20:33   Re: Ham_Killed superceded - force death animation
Reply With Quote #8

I'm still confused why anyone would want to supercede on ham_killed. It means you have 0 health but are still alive aka limbo. Can someone give a good example where you would actually supercede a death?
__________________
fysiks is online now
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
jim_yang
Veteran Member
Join Date: Aug 2006
Old 07-18-2010 , 23:03   Re: Ham_Killed superceded - force death animation
Reply With Quote #10

you did all stuff above just for blocking round end? If so, please use a plugin made by arkshine which using orpheu, it's more efficient and logical. If not, never mind.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
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 02:31.


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