[Tutorial] Custom Playerdamage system
#31

Quote:
Originally Posted by CalvinC
View Post
Armour is just the same as health, just that you put it under "default" in the switch, as i explained in the last line.
I am not exactly sure if your implementation accounts for the transition from health to armor, like if a player gets hit with 30 damage and is only left with 15 armor. Do you mind elaborating a little bit on that? I don't know if I'm missing something.

Quote:
Originally Posted by CalvinC
View Post
And infact i think he would be left with 0.99 health in your example, since GetPlayerHealth rounds the health, while SetPlayerHealth does not.
Atleast that's what it said on the wiki, but even if SetPlayerHealth rounds too, the player would need to receive 49.5 damage to round up to 50.

But if you want to be that accurate you can, it wouldn't differ more than 0.5 at most though.
Well, I once had a timer that was supposed to reduce the player's health by 0.1 and ended up reducing it 1.0 per tick. That leads to the assumption that as long as there is ANY decimal number, even if it is really really small, SetPlayerHealth rounds up to the next integer.
Reply


Messages In This Thread
Custom Playerdamage system - by CalvinC - 19.01.2015, 12:17
Re: Custom Playerdamage system - by Rudy_ - 19.01.2015, 13:24
Re: Custom Playerdamage system - by nezo2001 - 19.01.2015, 13:29
Re: Custom Playerdamage system - by PaulDinam - 20.01.2015, 05:06
Re: Custom Playerdamage system - by CalvinC - 22.01.2015, 08:47
Re: Custom Playerdamage system - by JaydenJason - 11.02.2015, 14:20
Re: Custom Playerdamage system - by Lordzy - 11.02.2015, 14:26
Re: Custom Playerdamage system - by CalvinC - 12.02.2015, 19:29
Re: Custom Playerdamage system - by JaydenJason - 17.02.2015, 16:18
Re: Custom Playerdamage system - by ZombieNest - 17.02.2015, 16:51
Re: Custom Playerdamage system - by kamiliuxliuxliux - 17.02.2015, 17:33
Re: Custom Playerdamage system - by CalvinC - 17.02.2015, 20:31
Re: Custom Playerdamage system - by De4dpOol - 20.02.2015, 08:24
Re: Custom Playerdamage system - by AndySedeyn - 20.02.2015, 09:16
Re: Custom Playerdamage system - by Cookland - 23.02.2015, 21:34
Re: Custom Playerdamage system - by Antoniohl - 24.02.2015, 09:28
Re: Custom Playerdamage system - by MikE1990 - 27.02.2015, 13:54
Re: Custom Playerdamage system - by rappy93 - 22.09.2015, 16:54
Re: Custom Playerdamage system - by Tamer - 22.09.2015, 21:49
Re: Custom Playerdamage system - by karemmahmed22 - 23.09.2015, 10:41
Re: Custom Playerdamage system - by Colonel - 24.09.2015, 19:41
Re: Custom Playerdamage system - by ahameed4755 - 24.09.2015, 19:59
Re: Custom Playerdamage system - by CalvinC - 29.09.2015, 15:45
Re: Custom Playerdamage system - by Slaughters - 21.04.2016, 19:31
Re: Custom Playerdamage system - by Micko123 - 27.04.2016, 10:49
Re: Custom Playerdamage system - by N0FeaR - 28.04.2016, 14:14
Re: Custom Playerdamage system - by CalvinC - 28.04.2016, 15:39
Re: Custom Playerdamage system - by oMa37 - 28.04.2016, 16:38
Re: Custom Playerdamage system - by Manyula - 29.04.2016, 13:29
Re: Custom Playerdamage system - by CalvinC - 29.04.2016, 15:20
Re: Custom Playerdamage system - by Manyula - 01.05.2016, 19:58
Re: Custom Playerdamage system - by oSAINTo - 15.08.2016, 22:26
Re: Custom Playerdamage system - by oSAINTo - 16.08.2016, 02:28
Re: Custom Playerdamage system - by GameOvr - 18.06.2018, 15:55

Forum Jump:


Users browsing this thread: 1 Guest(s)