[Submission] Impaler Gauntlet
- doomedarchviledemon
- Topic Author
- Pain Elemental
- Posts: 251
Class: 1
Type: Melee
Palette: Hexen
Summon: ImpalerGauntlet
Ammo Type: None
Powered Mode: No
Added States: No
Submitted: TheDoomedArchvile
Code: TheDoomedArchvile, DeVloek, BlueShadow
GLDefs: None
Sounds: Hexen
Sprites: Hexen, Neoworm, Nash
Sprite Edit: TheDoomedArchvile, Gothic
Idea Base: Upgrade to the Spiked Gauntlets
ACS: No
Description: A metal gauntlet that has two large spikes that rip through the flesh of anyone who is unlucky enough to get punched. They deal more damage than the spiked gauntlets and the wielder can even preform an uppercut. Holding the alt-fire while preforming the uppercut will throw a follow-up punch that deals significant damage.
The uppercut also acts as a jump to get onto higher ledges or reach air-born foes. The follow-up punch will also push the person forward a bit, so they can use this attack as an extra movement option.
Download
As always, feedback is welcome!
Please Log in or Create an account to join the conversation.
- DeVloek
- Arachnotron
- Posts: 401
- Several errors in the A_CustomPunch arguments. pufftype and armorbonustype both require a string, 0 won't work.
The default pufftype in Hexen is "PunchPuff", you should use that or a custom puff derived from it. Since most attacks call A_CustomPunch three times in a row, you'd probably want only one of them to produce a puff, for the others you can pass "none".
For the armorbonustype just pass "BasicArmorBonus". - The weapon sprites aren't wide screen friendly. Even at a standard 16:9 resolution some sprites are cut off at the sides. Might be fixable with some copy/pasting from other sprites that have the full arm.
You could use A_RadiusThrust with the RTF_THRUSTZ flag, but for some reason this only works in Doom, Strife and Heretic but not in Hexen. Might be an engine bug, not sure.I'd like to make enemies who get hit by the uppercut attack, or at least are within a close proximity of the player when using this attack, that they also get thrust straight into the air so that the followup punch will better connect. I tried using A_Blast but that only appears to push enemies horizontally. Is there a way to make an enemy to be launched only vertically when hit by a melee attack or with another A_Blast-like effect?
No idea if there's another way in Decorate. It would be really easy in Zscript, just make a custom puff and let SpecialMissileHit do ThrustThingZ on the victim.
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
- Posts: 251
- Switched to ZScript
- Addressed A_CustomPunch issues
- Fixed widescreen sprites (Just discovered how to see the full widescreen visual range in Slade3)
If there is another weapon on this site that uses this function I could look at how/where it's used and go from there myself. If there is please let me know and I'll try to learn by example.
Please Log in or Create an account to join the conversation.
- DeVloek
- Arachnotron
- Posts: 401
So I reported this error to the wiki staff and they corrected it. In reality, Puffs use DoSpecialDamage instead of SpecialMissileHit, which works very similar.
The default block is just for defining default values, no actual code goes there. Both SpecialMissileHit and DoSpecialDamage are existing functions, so you could call them in an actor's state but they won't do anything on their own. To actually do something with them, you have to override them, and this is done outside of the default and state blocks. For example:At least, I don't understand where to actually put this in the actual code. I tried a few configurations with a custom puff actor but I couldn't figure out if I was suppose to put it in the Default section or somewhere in the actor's States or what.
Note that ThrustThingZ does not work in this context (which I just found out, and it doesn't work for SpecialMissileHit either, my bad), but you can easily change any actor's Z velocity with the vel.z field.
The only issue I see now is that the victim is also pushed away when punched (at least those with low mass), but if you look at the DoSpecialDamage wiki you can see some example code that pulls it towards you, maybe you can use that to keep the victim in range so the follow-up punch can actually connect.
Btw before the wiki situation cleared up I thought of some other ways to achieve what you want with Zscript.
One method is using the HITTRACER flag and manipulating the tracer (the actor that was hit) directly during the spawn state of the puff, no need to override any functions. Example:
Another method is writing a completely custom melee attack function (used instead of A_CustomPunch) that uses the FTranslatedLineTarget struct together with LineAttack . You can make a shortrange hitscan attack (which is what regular melee attacks are internally), and with help of that struct you can get a pointer to the actor that was hit, and manipulate it from there. I don't think any of the R667 weapons or monsters use this method though, but I can write an example function for you if you want to use this, I'd just have to figure it out first since I never used this myself.
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
- Posts: 251
- Implemented the vel.z thrust using the HITTRACER flag.
- Added A_Blast to the end of the follow-up mid-air punch to push enemy away after all hits land.
- Further adjusted damage output.
I didn't notice the issue where enemies were being pushed back when running Hexen though. On my end the enemies are thrust straight upwards. However, when playing on Doom, I do notice the issue. After some testing though I don't think it's too big of an issue since the thrust forward from the mid-air punch still reaches the majority of grounded enemies who are hit into the air. The lightest enemy that doesn't die outright from the initial uppercut is the Demon, which while still being pushed away still gets hit with the mid-air follow up. At least from my testing. Would this issue be something related to certain source ports maybe? I am using GZDoom 4.13.0.
The other remaining issue I have that I don't understand is when using the altfire attack after using the mid-air punch, it will skip to the althold state instead of the altfire. Is there a reason for this? Maybe I am missing something but I think I have all of the Goto functions pointing to the proper places. My understanding is that if fire or altfire is triggered, it should always go to those states from the Ready state unless something specific is written as an exception?
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
- Posts: 1129
As for the AltFire/AltHold issue, you need to use A_ClearReFire before jumping back to Ready from the mid-air punch sequence.
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
- Posts: 251
- Implemented the A_ClearReFire function
With those issues fixed, I think this weapon is now fully functional as intended. Thank you both for your help on these!
Any further feedback points are welcome as always.
Please Log in or Create an account to join the conversation.
- DeVloek
- Arachnotron
- Posts: 401
Please Log in or Create an account to join the conversation.
- Gothic
- Moderator
- Posts: 1259
Please Log in or Create an account to join the conversation.
- doomedarchviledemon
- Topic Author
- Pain Elemental
- Posts: 251
I tried to implement the GetPlayerInput function to see if it could jump to the follow-up punch when pressing the Fire button, but I don't think I am doing it correctly lol. I looked at Gothic's updated Bow for reference and looked at the wiki page for some more info. It's not throwing any errors so far, but it's not triggering when I press the Fire button on the frames it's suppose to be listening for.
Maybe it's a difference between how this works in Decorate like how Gothic's Bow is on versus ZScript? Do I need another code entry for this to work properly? Or is it some incorrect calls/terms I am using in the code?
Ooooh, those are pretty nice! I'll work on updating the arms as well. Thank you for pointing these out!I recommend using Nash's Widescreen sprites instead of Neoworm's, they're more ultra wide friendly.
Please Log in or Create an account to join the conversation.