Author Topic: Realistic fall damage  (Read 1645 times)

0 Members and 3 Guests are viewing this topic.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Realistic fall damage
« on: January 09, 2010, 03:09:49 pm »
When you fall in realistic you loose hp. But theoretically roll should save some hp.
Now go and script it!
KAWAAAAAAAIIIIIIIIII

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Realistic fall damage
« Reply #1 on: January 09, 2010, 03:22:31 pm »
Cant be scripted.
Hardcoded.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Realistic fall damage
« Reply #2 on: January 09, 2010, 03:24:33 pm »
croat1gamer shut up. Can be scripted.
KAWAAAAAAAIIIIIIIIII

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Realistic fall damage
« Reply #3 on: January 09, 2010, 03:30:24 pm »
Actually, you are right, forgot the GetKeyPress fuction. With it its partially possible, but only if you are holding the crouch key, if you just tap it before you receive the damage it wouldnt get realized that you rolled.

This:
OnPlayerDamage used with GetKeyPress, but again, it wont be 100% accurate.
Also, how much should it be decreased.

edit:
Hm, looks easy, i might try to do it.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Realistic fall damage
« Reply #4 on: January 09, 2010, 03:33:39 pm »
How can it be not accurate? You can do the roll only if you hit the ground. Same with damage. So if you press and hold roll buttons before the ground hit it'll work.

Some changeable %
I suggest 50% for default
KAWAAAAAAAIIIIIIIIII

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Realistic fall damage
« Reply #5 on: January 09, 2010, 03:42:15 pm »
It is already hardcoded, if you roll you take less damage already.


Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Realistic fall damage
« Reply #6 on: January 09, 2010, 03:58:04 pm »
Hacktank,nope. (Well sometimes I notice this, but no)
KAWAAAAAAAIIIIIIIIII

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Realistic fall damage
« Reply #7 on: January 09, 2010, 04:49:46 pm »
Fall damage is hardcoded and doesn't trigger OnPlayerDamage. kthxbai

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Realistic fall damage
« Reply #8 on: January 09, 2010, 04:53:43 pm »
Oh, i though it counts as self damage.
Nvm then. Hardcoded, not scriptable.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Realistic fall damage
« Reply #9 on: January 10, 2010, 05:44:14 am »
Awesome. Enesce gay.

Cut the spam. It's getting old.
« Last Edit: January 10, 2010, 08:01:07 am by echo_trail »
KAWAAAAAAAIIIIIIIIII

Offline D4NG3R NL

  • Soldier
  • **
  • Posts: 130
  • You got Rickroll'd
Re: Realistic fall damage
« Reply #10 on: January 23, 2010, 05:18:49 pm »
How about this: The script takes the selfdamage, and then multiplies it by 1.(amount of % you want)
For example 1.50

If you would get 50HP selfdamage from the fall, it would add 50% so you will take 75 damage in total.

If you roll just before the jump, you wont recieve as mutch damage (HardCoded by standard)

Although this could be kinda annoying.. as when you shoot a bullet up in the air, and then the bullet hits yourself.. the damage would also be multiplied by 1.5 :P
+
If the selfdamage script adds the 50%.. it will "think" you selfdamaged again and add another 50%.. which would be instakill lol..

In other words: The "selfdamage" script needs to know to stop after the selfdamage happened.
                  Forum Rules   -   Search

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Realistic fall damage
« Reply #11 on: January 23, 2010, 07:47:26 pm »
How about this: The script takes the selfdamage, and then multiplies it by 1.(amount of % you want)
For example 1.50

If you would get 50HP selfdamage from the fall, it would add 50% so you will take 75 damage in total.

If you roll just before the jump, you wont recieve as mutch damage (HardCoded by standard)

Although this could be kinda annoying.. as when you shoot a bullet up in the air, and then the bullet hits yourself.. the damage would also be multiplied by 1.5 :P
+
If the selfdamage script adds the 50%.. it will "think" you selfdamaged again and add another 50%.. which would be instakill lol..

In other words: The "selfdamage" script needs to know to stop after the selfdamage happened.
Fall damage is hardcoded and doesn't trigger OnPlayerDamage. kthxbai


Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Realistic fall damage
« Reply #12 on: January 23, 2010, 08:22:39 pm »
I just looked at the falling damage code and it should be proccing OnPlayerDamage, and upon testing it does indeed work.
I tested using the latest 2.7.0 beta, so I might have fixed it (which I don't remember) somewhere between current dedicated server and the beta version.

So are you guys 100% certain fall damage doesn't proc OnPlayerDamage?

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Realistic fall damage
« Reply #13 on: January 24, 2010, 02:34:45 am »
Checked it again and it does call it, yay! Works weird tho, result was set to 0 and when I fell I lost health and then got it back, but that shouldn't affect increasing fall damage.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Realistic fall damage
« Reply #14 on: January 24, 2010, 07:06:56 am »
Whoever manages to make it when the player is rolling, just just holding the keys, here you go:

http://soldatcentral.com/index.php?page=script&f=159
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.