Raised This Month: $32 Target: $400
 8% 

[TF2] Unused Burning Death Animations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 11-20-2014 , 19:00   [TF2] Unused Burning Death Animations
Reply With Quote #1

A plugin I've been working on for a little while. Uses the old High Five plugin as a base.

Essentially, I was trying to make it trigger when a player died but I've had trouble deciding on what exactly the prerequisites for it triggering would be.

So I'm releasing it into the wild in hopes that someone here will take it and run with it and turn it into a functional plugin.

Things that could be added
Just some things I feel this needs. Up to you if you want to try to add it in or not.
  • A way to set the spawned prop_dynamic player model on fire during the burning death animation
    • Check if attacker is Pyro and wearing Pyrovision Goggles.
      • If so, use sparkly Pyrovision fire particles.
      • If not, use normal burningplayer_red particles.
  • Weapon/Cosmetic index-based checks?
    • 739 - Lollichop
    • 741 - Rainblower
    • 743 / 744 - Pyrovision Goggles (Vintage / Unique)
      • Perhaps either one of these indexes, or a combination could be used as a prerequisite check in order for the animation to play? Last I checked, these animations were from Meet the Pyro, so I feel tying into the Meet the Pyro items in some way would be nice.
  • A way to dissolve the prop_dynamic player model a second before the death animation ends.
    • I know how to dissolve the bloody thing, it's very simple. The only issue is I'd prefer to have it dissolve the model like the Phlogistinator dissolves the model, but I don't know how to do that.

Development Notes
(Development notes also present in the source code)

I used ZapStudio.net's frame calculator (specifically the "convert frames to time" portion set to 30FPS) to convert the # of frames into time.

However, the animations got cut-off before they finished, so I had to increase the time until everything looked right. You may wish to utilize the sm_testanims command to perfect the taunt timing.

Code:
Scout - "primary_death_burning" - 88 frames
Soldier - "primary_death_burning" - 116 frames
Pyro - No burning animation
Demoman - "PRIMARY_death_burning" - 67 frames
Heavy - "PRIMARY_death_burning" - 92 frames
Engineer - "PRIMARY_death_burning" - 103 frames
Medic - "primary_death_burning" - 100 frames
Sniper - "primary_death_burning" - 131 frames
Spy - "primary_death_burning" - 57 frames
Attached Files
File Type: sp Get Plugin or Get Source (TF2_BurnDeathAnims.sp - 1641 views - 9.5 KB)

Last edited by 404UserNotFound; 11-20-2014 at 19:00.
404UserNotFound is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 11-20-2014 , 23:05   Re: [TF2] Unused Burning Death Animations
Reply With Quote #2

I'd like to not see you abandon this.

You can set the burning particle as well as the phlogistinator death effect in the same manner Pelipoika is setting the particles on the HHH. https://forums.alliedmods.net/showpo...&postcount=352

If you do continue this, please prevent jumping/attacking, check the person's model scale (resize players), as well as the taunt speed of the player so you can set those attributes on the prop accordingly.

Last edited by Sreaper; 11-20-2014 at 23:11.
Sreaper is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 01-09-2015 , 06:12   Re: [TF2] Unused Burning Death Animations
Reply With Quote #3

Quote:
Originally Posted by abrandnewday View Post
Ran into problems:
1. If a player happens to jump and then die (or in this case, jump and trigger sm_testanims), the player model will perform the animation while hovering in the area the player died in. Don't know how to correct this.
2. I added in the particle creation system, set the bone to "bip_head" which should be a bone on the player model according to HLMV, but the fire particle spawns at the player model's feet and stays there instead of being removed.
3. Was getting array index out of bounds errors with "new g_iHHHParticle[MAXPLAYERS + 1][3];" (which I renamed "g_iFireParticle"). No idea how to fix that.
4. SetAlpha does not seem to re-set itself (possibly as a result of the array index out of bounds error), so players and their cosmetics/weapons stay invis.

Code:
L 11/21/2014 - 00:14:57: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/21/2014 - 00:14:57: [SM] Displaying call stack trace for plugin "TF2_BurnDeathAnims.smx":
L 11/21/2014 - 00:14:57: [SM]   [0]  Line 179, C:\Coding\1.7 Scripting\addons\sourcemod\scripting\TF2_BurnDeathAnims.sp::ExtinguishPlayerModel()
L 11/21/2014 - 00:14:57: [SM]   [1]  Line 158, C:\Coding\1.7 Scripting\addons\sourcemod\scripting\TF2_BurnDeathAnims.sp::IgnitePlayerModel()
L 11/21/2014 - 00:14:57: [SM]   [2]  Line 257, C:\Coding\1.7 Scripting\addons\sourcemod\scripting\TF2_BurnDeathAnims.sp::AttachNewPlayerModel()
L 11/21/2014 - 00:14:57: [SM]   [3]  Line 205, C:\Coding\1.7 Scripting\addons\sourcemod\scripting\TF2_BurnDeathAnims.sp::Command_TestAnims()
Attached is what I've done thus far, have fun with it people. I'm too pissed at it and I have too much of a headache right now to continue messing with it.
I fixed the out of bound problem (you were passing a model index instead of the client).

Also I think that you need to use the name of the client to set it as a parent, and maybe parenting the prop to the client will solve the "on jump" problem?
Attached Files
File Type: sp Get Plugin or Get Source (TF2_BurnDeathAnims.sp - 937 views - 13.8 KB)
ClassicGuzzi is offline
rowedahelicon
Senior Member
Join Date: Feb 2011
Location: The Observatory
Old 01-19-2015 , 21:06   Re: [TF2] Unused Burning Death Animations
Reply With Quote #4

And here you go, tested and confirmed working on a few of my servers. Here's a crummy video for a headsup.

https://www.youtube.com/watch?v=cARP...ature=youtu.be

Here's what I did. I cleaned up a lot of code, there were a few mistakes I noticed which I took care of. Stuff that was stopping the events from ever firing and such.

Code:
    if (!IsValidClient(victim))
    {
        return Plugin_Continue;
    }
    if (!IsValidClient(attacker))
    {
        return Plugin_Continue;
    }
    if (attacker==victim)
    {
        return Plugin_Continue;
    }
Which was better written out as

Code:
    if (!IsValidClient(attacker)){ return Plugin_Handled; }
Then, your custom kill was incorrect.

Code:
// Doesn't seem to work.
        if (customkill == TF_CUSTOM_BURNING)
It should have been this, as it goes by the int not the string. I also included some other kill scenarios.

Code:
        // Burning, Burning Flare, Burning Arrow, Flare Pellet
        if (customkill == 3 || customkill == 8 || customkill == 17 || customkill == 53)
For your aerial death issue, I added in a kill clause.

Code:
    if (victimClass == TFClass_Pyro || !(GetEntityFlags(victim) & FL_ONGROUND)) //Will not fire if the victim is a pyro or died in the sky.
For your burning prop_dynamic issue, I borrowed some code from Sarge, with his permission.



The final bit is that when the animation ends, it is replaced with a new tf_ragdoll that immediately fizzles up the phlog ash effect!

Code:
    SetEntProp(Ent, Prop_Send, "m_bBecomeAsh", 1);
I called this a _clean version, as I stripped out a lot of the other code. The test command is gone, this runs solely on death now and will not stun / later un-stun players later. This code was also removed to protect spies, spies using the dead ringer will live, but leave behind a burning spy corpse as normal as if they normally died. I changed as bit of the plugin_continue bit on the death catch in order to stop problems with the killfeed.

So basically now...

You die -> Original ragdoll killed -> New model -> Animation -> Model is killed -> New ragdoll -> bBecomeAsh -> new ragdoll killed.

It's without errors, and so far tested it seems to be without problems. I would like to see a second opinion on the way the final ragdoll gets made, the animation doesn't have a graceful end so it's kind of weird to watch a ragdoll pop in out of existence at the end, but it does immediately burn up so it's not too big of an issue.
Attached Files
File Type: sp Get Plugin or Get Source (TF2_BurnDeathAnims_clean.sp - 1300 views - 8.5 KB)
File Type: smx TF2_BurnDeathAnims_clean.smx (7.7 KB, 328 views)
__________________
SCG, A furry community in the stars - https://www.scg.wtf
rowedahelicon is offline
Send a message via Skype™ to rowedahelicon
rowedahelicon
Senior Member
Join Date: Feb 2011
Location: The Observatory
Old 01-20-2015 , 03:29   Re: [TF2] Unused Burning Death Animations
Reply With Quote #5

Quote:
Originally Posted by abrandnewday View Post
You sir are a god. Feel free to release this in New Plugins if you want to, I'm sure it would be greatly appreciated by the community
Many thanks <3

I have done so here : https://forums.alliedmods.net/showth...43#post2251343 I'd recommend everyone grab it from there as it is a more featured version.
__________________
SCG, A furry community in the stars - https://www.scg.wtf
rowedahelicon is offline
Send a message via Skype™ to rowedahelicon
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:01.


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