Raised This Month: $ Target: $400
 0% 

Replacing player model (death animations only)


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-05-2009 , 12:49   Re: Replacing player model (death animations only)
Reply With Quote #2

If you have a linux server, you should try to play with Orpheu and the CS functions provided.
__________________
Arkshine is offline
reficooL
Junior Member
Join Date: Nov 2009
Old 11-05-2009 , 22:59   Re: Replacing player model (death animations only)
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
If you have a linux server, you should try to play with Orpheu and the CS functions provided.
Hi, thanks for answer.
I've seen this post and the module seems AWESOME, but unfortunately my server is running on windows.

There's any way to do somehitng similar in windows? or are you considering add windows support for this module in the future?

Thanks, and good job awesome module.
reficooL is offline
drumzplaya13
Senior Member
Join Date: Feb 2008
Location: TEXAS
Old 11-05-2009 , 23:41   Re: Replacing player model (death animations only)
Reply With Quote #4

Quote:
Originally Posted by reficooL View Post
Hi, thanks for answer.
I've seen this post and the module seems AWESOME, but unfortunately my server is running on windows.

There's any way to do somehitng similar in windows? or are you considering add windows support for this module in the future?

Thanks, and good job awesome module.
The module was said to be very hard to code for windows.
__________________
Think Positive - Stay Positive
drumzplaya13 is offline
reficooL
Junior Member
Join Date: Nov 2009
Old 11-08-2009 , 00:57   Re: Replacing player model (death animations only)
Reply With Quote #5

Ok, it seems to be impossible to replace player models in real time, so:

1. On event death, get player direction and player model sequence (animation, crouch, hs, etc).

2. Remove original player model.

3. Create new entity with custom skeleton player model (with death animations/sequences only), taking care about original direction and sequence.

4. After reproduced player death animation (with custom skeleton model), replace it with static dead sekeleton, on ground, with the same direction.

I'll compile the necesary sequences/animations for the skeleton player model.

PD: Another way:

1. On event death, get player direction and player model sequence (animation, crouch, hs, etc).

2. Remove player original model.

3. Create new entity with custom skeleton player model (with death animations/sequences and static death skeleton), taking care about original direction and sequence.

4. After reproduced death animation, change the sequence to one static dead skeleton (included in the same model), on ground, with the same direction.

I think this second way it's more efficient and can be done.
Any sugestion?

Thanks, I've no skill coding/scripting.

PD: I dunno if this has to be in requests. ??
reficooL is offline
Reply



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:42.


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