Page MenuHomeFeedback Tracker

Functions "vest", and "uniform" return empty string when invoked for a dead player
Closed, ResolvedPublic

Description

It's not possible to find out what kind of uniform, or vest a player has after the player has died.

This would be useful in scenarios where mission developers want to do things like allow a player to steal an enemy's uniform after killing him.

Another example is for missions that want to read uniform, and vest information when a player dies so that they can persist this information, and allow the player to respawn with the same type of clothing/gear. The only alternative at the moment is to periodically cache the vest, and uniform information until the player dies. {F18249}

Details

Legacy ID
611541404
Severity
Minor
Resolution
Duplicate
Reproducibility
Always
Category
Scripting
Steps To Reproduce

player setDamage 1;

if ((uniform player) == "" ) then {

diag_log "There is no uniform information for dead players";

};

Event Timeline

micovery edited Steps To Reproduce. (Show Details)Mar 20 2013, 7:27 AM
micovery edited Additional Information. (Show Details)
micovery set Category to Scripting.
micovery set Reproducibility to Always.
micovery set Severity to Minor.
micovery set Resolution to Duplicate.
micovery set Legacy ID to 611541404.May 7 2016, 12:55 PM

Have you tried running this on a respawn eventhandler?

The event handler passes the corpse of the previous player object on respawn. Refering to that, rather than 'player' could yield other results.

I did try using "MPKilled", and "Killed" event handlers. The problem is still reproducible using the unit/corpse object received through the event handler. I have uploaded a sample mission showcasing the issue.

Here is the output produced in the RPT, with the sample mission:

"player_handle_killed [cop1,cop1]"
"player_dump_gear [cop1]"
"_unit = cop1"
"(uniform _unit) = "
"(vest _unit) = "
"(goggles _unit) = "
"(headgear _unit) = "

"player_handle_mpkilled [cop1,cop1]"
"player_dump_gear [cop1]"
"_unit = cop1"
"(uniform _unit) = "
"(vest _unit) = "
"(goggles _unit) = "
"(headgear _unit) = "

The same Problem with headgear and items

Confirmed with killed EVH.

None of the gear-related functions are working on dead units, apart from "handgunWeapon (unit)".

List of non-working functions I have found:
backpack
backpackItems
uniform
uniformItems
vestItems
vest
primaryWeapon
primaryWeaponItems
secondaryWeapon
secondaryWeaponItems
handgunItems
assignedItems
headgear
goggles

Confirmed! cant get anything from dead body, so, gear respawn script cant be done...

Indeed it is.