Page MenuHomeFeedback Tracker

Empty HitPoints in cfgVehicles
Feedback, WishlistPublic

Description

The trucks gives an empty array when I use configFile >> "cfgVehicles" >> "truck name" >> "HitPoints".
In the config browser in the editor there is two parents named HitPoints.
I guess the one is the actual, while the other is empty.
By bad luck it will choose the empty HitPoints config instead of the real one.

Edit: Some of the helicopters don't give the HitPoints as well. {F20689} {F20690} {F20691}

Details

Legacy ID
1225725521
Severity
None
Resolution
Open
Reproducibility
Have Not Tried
Category
Engine
Steps To Reproduce

count(configfile >> "CfgVehicles" >> "B_Truck_01_covered_F" >> "HitPoints");
returns 0.

count(configfile >> "CfgVehicles" >> "B_MRAP_01_gmg_F" >> "HitPoints"");
returns all the hitpoints as it should.

Additional Information

Some vehicles doesn't return the Body/Hull Hitpoints.

I added a small mission example to show which vehicles have this error.

Event Timeline

Ed edited Steps To Reproduce. (Show Details)Jul 5 2013, 9:33 AM
Ed edited Additional Information. (Show Details)
Ed set Category to Engine.
Ed set Reproducibility to Have Not Tried.
Ed set Severity to None.
Ed set Resolution to Open.
Ed set Legacy ID to 1225725521.May 7 2016, 3:19 PM
Ed edited a custom field.

How did you made ​​this screenshot? I mean from where?

Ed added a subscriber: Ed.May 7 2016, 3:19 PM
Ed added a comment.Jul 5 2013, 10:47 PM

It's one of the dialogs in a mission I am busy developing.

Ed added a comment.Jul 8 2013, 3:26 PM

Some hats from cfgWeapons can be worn, but has no model. (invisible hats)

Ed added a comment.Jul 8 2013, 6:43 PM

Vehicles still returning 0 HitPoints:
PO-30 Orca
HEMTT Transport

Other issues:
Quadbike, Hunter, Ifrit and Strider does not return HitBody
Zamak only returns wheels.
Ifrit has HitReserveWheel, but it doesn't have a reserve wheel.

This is still a problem. Just found this myself while trying to get HitPoint names http://forums.bistudio.com/showthread.php?181848-How-can-I-get-the-health-of-a-vehicles-hull-trurret-tracks&p=2751300&viewfull=1#post2751300.
Came here to post but found this open ticket.

I was unable to reproduce any from the issues mentioned in here. Are you still observing any issues in this matter? Thanks

Yes it still seems to be a problem in Stable 1.46. Using either a For loop or the command configClasses to iterate around the vehicles hitpoint classes. Try

terminate h;
h = [] spawn {

    while {true} do {

            hinttext = format ["%1\n\nMain Points\n******\n", typeOf cursorTarget];
            _veh = cursorTarget;
            "
            	_HPName = configName _x;
                hinttext = hinttext + format['%1 >> %2\n', _HPName, cursorTarget getHitPointDamage _HPName ];
            "configClasses ( configFile >> "CFGVehicles" >> typeOf _veh >> "Hitpoints" ) ;
            
        hintSilent hinttext;
        sleep 1;
    };

};

OR

terminate h;
h = [] spawn {

    while {true} do {

            hinttext = format ["%1\n\nMain Points\n******\n", typeOf cursorTarget];
            _veh = cursorTarget;
            _baseCFG = configFile >> "CFGVehicles" >> typeOf _veh;
            for "_i" from 0 to (count (_baseCFG >> "HitPoints"))-1 do {
                _HPName = configName((_baseCFG >> "HitPoints") select _i);
                hinttext = hinttext + format["%1 >> %2\n", _HPName, cursorTarget getHitPointDamage _HPName ];
            };

        hintSilent hinttext;
        sleep 1;
    };

};

From the debugConsole and compare the hitPoints reported in the hint whilst looking at a B_Truck_01_covered_F or O_Heli_Light_02_F to the hitpoints in the actual config for the vehicle. They do not seem to match?

count(configfile >> "CfgVehicles" >> "B_Truck_01_covered_F" >> "HitPoints");
returns 15
There are actually 19 hitpoints in the config

count(configfile >> "CfgVehicles" >> "O_Heli_Light_02_f" >> "HitPoints");
returns 9
There are actually 32 hitpoints in the config

They were the first two i retried.