Raised This Month: $ Target: $400
 0% 

Replacing player model (death animations only)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reficooL
Junior Member
Join Date: Nov 2009
Old 11-05-2009 , 12:45   Replacing player model (death animations only)
Reply With Quote #1

Hi masters!

I want to make a little plugin to add some gore stuff on my serv.

I saw this plugin:

http://forums.alliedmods.net/showthread.php?p=475029

I like the idea, but I want to go beyond.

I want to add the complete death animation with a skeleton model I've done (not mine, only recompiled with death animations).
And I want the player to disintegrate (to see later) and replace with the skeleton model (death animations), only if is killed with AWP, but I want it working first.

How can I "known" why animation may be used?

Ex: if player is crouch, crouch_dead anim, if was haedshot, headshot animation.

And how can I "select" the animation from a model? (to use one model only).

Errors I've got trying (if the entity is created using a model):

* The animation is reproduced, but only default animation (no change if crouch, etc), played once and no corpse remainig on ground. Just disapears immediately ???
* Default animation looping for a while.
* No animation, just appears a freeze model and stay immobile (standing) for a while.

I'm wondering it's due creating entity instead of replacing it.
But... How can I replace the player model in realtime (taking care at the current animation)? I think it's the way, but I dunno if it's possible.

Any suggestion?

Attached the skeleton model (see with HLMV) and a screenshot, greetings.

PD. I found this, maybe useful stuff:

Code:
public client_PreThink( id )
{
  // check some vars first and whatnot..
  set_animation(id, 2); // 2 = grenade throwing, what is death?
}

public set_animation( id, seq ) 
{
  entity_set_int(id, EV_INT_weaponanim, seq);
  message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);
  write_byte(seq);
  write_byte(entity_get_int(id, EV_INT_body));
  message_end();
}
Attached Thumbnails
Click image for larger version

Name:	dead_player.jpg
Views:	263
Size:	84.5 KB
ID:	53165  
Attached Files
File Type: zip skelet_death_anims.zip (386.3 KB, 107 views)

Last edited by reficooL; 11-08-2009 at 01:04. Reason: Re-Uploaded image and model, seems to be corrupted... What the... ???
reficooL is offline
 



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 17:43.


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