According to the [wiki=Classes:StrifePlayer]StrifePlayer[/wiki] article, two new states were added to the class in r1125 - 'Firehands' and 'Firehandslower'. I assume this is in relation to the special player burn death discussed in the past. Can anyone shed some light on their function, and wether or not this is part of an effort to implement POV death sprites or similar?
Re: StrifePlayer additional states?
Posted: Mon Jan 12, 2009 6:18 am
by Skippy
I'll give this a bump. Anyone (particularly devs) able to assist?
Re: StrifePlayer additional states?
Posted: Mon Jan 12, 2009 2:08 pm
by Graf Zahl
Those are the burning hand 'weapon' sprites. They are referenced by the StrifePlayer's A_ItBurnsItBurns and A_CrispyPlayer code pointers (great names, btw.)
Re: StrifePlayer additional states?
Posted: Mon Jan 12, 2009 5:34 pm
by Skippy
Thanks for replying, Graf. Sorry for not being clear enough - I know what they do and that they are referenced by the aforementioned action functions, but I was curious as to why they only appeared as part of the player's DECORATE definition recently (at least in relation to how long we've had Strife support). Is there a generic POV death sprite implementation in the works / is A_ItBurnsItBurns et al being exposed for generalised DECORATE usage?
Based on your comments in the linked thread above, it appears that a generic implementation of 'death hands' was feasible from as far back as May 2007.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 11:38 am
by InsaneFury
I'm bumping this one a bit, as I'm looking into using the A_ItBurnsItBurns() and A_CrispyPlayer() for a playerclass-based DooM2 project. I'd like to have some light shed on how these features can be used, as the Wiki is quiet about them so far...
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 12:49 pm
by XutaWoo
From what I'm guessing, A_ItBurnsItBurns causes your weapon to go to the player's Firehands state, while A_CripsyPlayer causes it to go to the Firehandslower state.
You'll need to inhereit from StrifePlayer if you want to use them, I'm guessing.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 3:53 pm
by NeuralStunner
XutaWoo wrote:You'll need to inhereit from StrifePlayer if you want to use them, I'm guessing.
Yes. These code pointers are declared native to StrifePlayer in Decorate.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 5:14 pm
by InsaneFury
I'd like to see if I can use the effect in DooM2, but I can't seem to get it to work.
The player displays the Burn animation, but the Waving hands only seem to display very shortly. Basically in the Death state, I put Goto Fire state, which plays correctly until A_CrispyPlayer is called. ZDoom crashes right there (Report).
I uploaded a test wad here, could anyone have a look & see what's broken?
Note that I copied the sprites from Strife 1:1 without touching the palette (which for demonstration purpose shouldn't matter much).
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 6:28 pm
by NeuralStunner
Hmm...
A_ItBurnsItBurns is what tells the engine not to immediately drop dead, and is supposed to start the hand waving animation (FireHands) instead. A_CrispyPlayer apparently tells it that the player is now dead, and to drop him to the floor immobile, while lowering the waving arms (FireHandsLower). Without it, you can still "walk" around and open doors after "dying".
Since the hand wave animation doesn't play, (and God only knows why,) I think this might be why the latter codepointer crashes.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 7:26 pm
by Gez
Here's some code. Note that P_SetPsprite is the function that sets the "player sprite", that is to say, the various HUD sprite thingies (weapons, weapon flashes, targeter powerup, etc.).
Okay, so yes, A_CrispyPlayer does set the player state to "dead" (the PST_DEAD line).
The interesting thing is after that. There's a horrible hack. It adds up the state numbers of the current weapon sprite and the FireHandsLower state, and substract from that the state number of the FireHands state. So, be sure to declare the states in the same sequence as they are in StrifePlayer: FireHands then FireHandsLower, and as many states for either.
Seems pretty straightforward. Little hack as it sets the player to be still alive. Then it hijacks the Psprite weapon "channel" to display the fire hands, while nullifying your weapon so you can't attack, and preventing you from changing to another weapon. Also makes you all shiny (extralight = 3).
Rather simple as well: it lowers the vertical offset of the weapon Psprite (remember that 0 is at the top, so increasing the offset means going further downward, so a high value means a low offset), and if the Psprite offset becomes so low that the weapon can't be seen anymore, then just remove that sprite altogether. Also, makes the player less shiny by decreasing extralight.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 7:51 pm
by Ceeb
So the Strife burning hands are the most hacktacular thing ever made.
Re: StrifePlayer additional states?
Posted: Sat Jan 16, 2010 8:02 pm
by NeuralStunner
Gez wrote:The interesting thing is after that. There's a horrible hack. It adds up the state numbers of the current weapon sprite and the FireHandsLower state, and substract from that the state number of the FireHands state. So, be sure to declare the states in the same sequence as they are in StrifePlayer: FireHands then FireHandsLower, and as many states for either.
Aha! So, cutting the AltSkin* states and stuff, adding the Disintegrate state, and removing the state jump from Death makes it work. Thanks Gez!
Actor PL_BurnBurn : StrifePlayer Replaces DoomPlayer
{
// Override Strife properties with Doom properties to simulate DoomPlayer motions
Radius 16
Player.ColorRange 112, 127
MaxStepHeight 24
Player.RunHealth 0
// Original DooMPlayer properties:
Player.StartItem "Pistol"
Player.StartItem "Fist"
Player.StartItem "Clip", 50
Player.WeaponSlot 1, Fist, Chainsaw
Player.WeaponSlot 2, Pistol
Player.WeaponSlot 3, Shotgun, SuperShotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
Player.DisplayName "Marine"
Player.CrouchSprite "PLYC"
States
{
Spawn:
PLAY A -1
Loop
See:
PLAY ABCD 4
Loop
Missile:
PLAY E 12
Goto Spawn
Melee:
PLAY F 6 BRIGHT
Goto Missile
Pain:
PLAY G 4
PLAY G 4 A_Pain
Goto Spawn
Death:
PLAY H 10
PLAY I 10 A_PlayerScream
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
XDeath:
PLAY O 5
PLAY P 5 A_XScream
PLAY Q 5 A_NoBlocking
PLAY RSTUV 5
PLAY W -1
Stop
Burn:
BURN A 3 Bright A_ItBurnsItBurns
BURN B 3 Bright A_DropFire
BURN C 3 Bright A_Wander
BURN D 3 Bright A_NoBlocking
BURN E 5 Bright A_DropFire
BURN FGH 5 Bright A_Wander
BURN I 5 Bright A_DropFire
BURN JKL 5 Bright A_Wander
BURN M 5 Bright A_DropFire
BURN N 5 Bright A_CrispyPlayer
BURN OPQPQ 5 Bright
BURN RSTU 7 Bright
BURN V -1
Stop
Disintegrate: // Need Sprites here.
DISR A 5 A_PlaySoundEx("misc/disruptordeath", "Voice")
DISR BC 5
DISR D 5 A_NoBlocking
DISR EF 5
DISR GHIJ 4
MEAT D -1
Stop
FireHands:
WAVE ABCD 3
Loop
FireHandsLower:
WAVE ABCD 3 A_HandLower
Loop
}
}
In the future though, I'd hope a much less hacky method could be adopted...
Re: StrifePlayer additional states?
Posted: Sun Jan 17, 2010 1:36 am
by Graf Zahl
Ceeb wrote:So the Strife burning hands are the most hacktacular thing ever made.
Not the most but this a pretty dirty effect. So dirty in fact that ZDoom had to add some new code pointers to do them. Strife originally did some of this effect in an even more hackish way. What ZDoom does is rather tame by comparison.
Re: StrifePlayer additional states?
Posted: Sun Jan 17, 2010 2:09 am
by InsaneFury
Ok, so in order for people to (ab)use these functions, they'll have to steer clear of any new player states (like freeze-/fire death, per-damagetype pain-/deathstates?
Re: StrifePlayer additional states?
Posted: Sun Jan 17, 2010 2:30 am
by Graf Zahl
No. If you inherit from the Strife player all you need to do is call these functions in the proper places. They don't depend on anything external.