Page 2 of 2

Re: Vehicle that stops working but never dies..

Posted: Wed Jul 21, 2010 7:25 am
by Senshi
Sure you can. Though it all depends on your materialsettings. A low maxHP though means that the minimum steps for damage is 1HP. Which, having 100HP, is 1% steps. If enemies are converging on the vehicle (as it would be rather important in the CtF style gamemode) and if small arms fire damages it too, it would be good to have some fractions as reserves. But AFAIK the Hitpoint system doesn't work with fractions/decimals like 90,75 HP. At least you can't set Armoreffects etc. to such values. But well, I'm sure fook will be able to figure that out for his case specifically.

Re: Vehicle that stops working but never dies..

Posted: Wed Jul 21, 2010 8:18 pm
by Apache Thunder
After implementing a number read out for soldier HP/Vehicle HP, I am led to believe that the damage system does support fractional HP count. My BFhereos'42 mod has this feature. When taking damage, the number hud element not only shows whole number but a decimal number too. So it is possible to deal damage that is less the 1 but not zero. Not sure if the armor effect system would accept decimal numbers but I see no reason why not.

This video shows what I mean:

http://www.youtube.com/watch?v=3y8nNvY6u1Y

The numbers on the bottom left corner report the exact HP the soldier (and vehicle if the player is in one) has and does correctly report fractional HP that is on the other side of that decimal point. ;)

For vehicles, it reports the vehicle HP minus the critical damage. Once the vehicle hit's the critical damage point the HUD element reports the HP as 0 and then it goes to a negative number when the critical damage adds damage to the vehicle. (thus the negative number gets larger)

So for example a vehicle has 100 Hp and it's critical damage is set to 50. The HUD would have reported the HP as 50. When that reaches zero then the vehicle is in critical damage range and then it will go to a max of -50 before the vehicle dies. ;)

Re: Vehicle that stops working but never dies..

Posted: Wed Jul 21, 2010 10:19 pm
by fo0k
That freeking mod is insane dude. :)

Re: Vehicle that stops working but never dies..

Posted: Wed Apr 18, 2018 9:27 am
by russ
Zombie thread, but you might try ObjectTemplate.resetWhenRemoved 1. After timeToLiveAfterDeath has passed, it should reset it to full health.

Re: Vehicle that stops working but never dies..

Posted: Fri Apr 20, 2018 2:09 am
by freddy
russ wrote:Zombie thread, but you might try ObjectTemplate.resetWhenRemoved 1. After timeToLiveAfterDeath has passed, it should reset it to full health.
I must try that code! :)

Re: Vehicle that stops working but never dies..

Posted: Thu Apr 26, 2018 5:31 am
by Swaffy
Swaffy's booty code inbound, take cover

ObjectTemplate.hitpoints 9999
ObjectTemplate.maxhitpoints 9999
ObjectTemplate.criticalDamage 9959
ObjectTemplate.hpLostWhileCriticalDamage 0

(tank sitting at -9040 hp)
"Swaffy repair that tank!"
"... but it's over 9000 ..."