Immunity to Hexen Fall damage

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Immunity to Hexen Fall damage

Re: Immunity to Hexen Fall damage

by 4page » Mon Nov 11, 2019 5:47 pm

If compatibility with Zandronum isn't important, you should really consider using ZScript. Lack of knowledge or laziness are weak excuses for not using it, if you ask me.
It's not important, but I started this mod with DECORATE and I want to finish it with DECORATE, or at least get it to a point where I don't know what else to do with it, then start learning zscript. I'll probably end up porting my mod to zscript as I learn and find better ways to do things. That's the plan at least.

Re: Immunity to Hexen Fall damage

by Void Weaver » Mon Nov 11, 2019 3:21 pm

Wow! That's make sense, thank you for that tip. :)
Anyway the overlay above work for this goal like as swiss watch and prevent from taking lethal damage.

Re: Immunity to Hexen Fall damage

by Blue Shadow » Mon Nov 11, 2019 2:40 pm

4page wrote:However, Hexen has a weird thing about it that it doesn't matter what kind of damage protection you use, at least from what I've found, if you're falling fast enough and hit the floor, it insta kills you.
What happens here is that the game does one million points of damage (referred to as "telefrag damage") upon hitting the floor. It's treated specially, and is meant to guarantee a death. That's why your powerup had no effect in protecting you from the fall in that case.

Although it's not a perfect solution, since its effect is universal, you can set the [wiki=Actor_flags#LAXTELEFRAGDMG]LAXTELEFRAGDMG[/wiki] flag on the player. The flag will allow the powerup to function as normal and do its thing.


If compatibility with Zandronum isn't important, you should really consider using ZScript. Lack of knowledge or laziness are weak excuses for not using it, if you ask me.

Re: Immunity to Hexen Fall damage

by Void Weaver » Sun Nov 10, 2019 3:16 am

Yeah, check for floorz are interferes here, so only VelZ check needed.

Re: Immunity to Hexen Fall damage

by 4page » Sat Nov 09, 2019 9:33 pm

Ooof. That's a frustrating limitation. Thanks for the tips, though. I figured out a mild workaround that involved checking the distance between the player and the floor and if it was within the VelZ range, then adjusting the Velz to be slightly less than the distance between the player and the ground. Worked great until I found out that it didn't work on actors and you could still be instakilled by landing on top of them. Back to the drawing board, I guess.

Re: Immunity to Hexen Fall damage

by Void Weaver » Fri Nov 08, 2019 5:17 am

Yep, for a some reason DamageFactor "Falling", 0.0 doesn't prevent from getting instakill damage (aka Minimum kill speed), which will guaranteed inflicted after reaching VelZ = -63. So you should be sure that player's VelZ will be less than -63 when landing will happen:

Code: Select all

ACTOR FallDmgProtector : CustomInventory
{
//+INVENTORY.UNCLEARABLE
+INVENTORY.KEEPDEPLETED
Inventory.MaxAmount 1
States
{
Spawn:
TLGL A 1 Bright
TLGL B 1 
TLGL C 1 Bright
TLGL D 1
Loop

Pickup:
Use:
TNT1 A 0 A_GiveInventory("PowerFallingProtection")
TNT1 A 0 A_Overlay(5,"CriticalSpeedHandler",1) //Also you can call overlay directly from custom player's Spawn state, instead of CustomInventory.
Stop

CriticalSpeedHandler:
TNT1 A 1
{
If(VelZ<=-63){A_ChangeVelocity(VelX,VelY,-60,CVF_RELATIVE|CVF_REPLACE);Return state("");}
Else{Return state("");}
}
Wait
}
}

ACTOR PowerFallingProtection : PowerProtection
{
//+INVENTORY.UNCLEARABLE
DamageFactor "Falling", 0.0
Powerup.Duration 0x7FFFFFFF
}

Immunity to Hexen Fall damage

by 4page » Thu Nov 07, 2019 6:49 pm

I'd like to avoid ACS or Zscript if possible, but if there's no other options I may have to branch out. So, I've tried to use a PowerProtection inherited item to make the player immune to fall damage, and it works like a charm. However, Hexen has a weird thing about it that it doesn't matter what kind of damage protection you use, at least from what I've found, if you're falling fast enough and hit the floor, it insta kills you. The only way I can figure to negate this so far is to just constantly check the players height against the floor, but even then it would be really hacky and complicated. Is there some easier and simpler way that I'm missing?

Top