Jump to content
Sign in to follow this  
trex

Cannot remove Map from dead body

Recommended Posts

Hi, I want to remove weapon and some item from dead Opponents (AI).

Here is what I do :

//init.sqf
{if(side _x == east) then {_x addEventHandler ["Killed", {null = [(_this select 0)] execVM "remove_Loot.sqf"}] }} forEach allUnits;

and

//remove_Loot.sqf
_man = _this select 0;
removeallweapons _man; // That work no more weapon on dead people	
removebackpack _man; // May be i dont know if basic dead AI (riffleman) have backpack anyway
removeAllAssignedItems _man; // THAT DONT WORK ! he still have full item gear on ground on his body

Tried too :

//remove_Loot.sqf
removeallweapons _man;	
removebackpack _man;
//removeAllAssignedItems _man;
_man unassignItem "ItemMap"; // dont work
_man removeItem "ItemMap"; // dont work

Here is 2 Screenshoots of the simple dummy mission to test this out (EDIT cannot post link yet, have to wait 1 day to be able to) :

screenshoot steam id=132573632

And the result, that do not work (map still lootable here) :( :

screenshoot steam id=132573778

Share this post


Link to post
Share on other sites

Dead units are a bit problematic with the inventory system at the moment. Dead units do not return any Uniform or Vest either. Why not remove it while they are still alive?

Share this post


Link to post
Share on other sites
Dead units are a bit problematic with the inventory system at the moment. Dead units do not return any Uniform or Vest either. Why not remove it while they are still alive?

Yeah it is what i was thinking this night. But anyway i just wanna know cause in theory it should work too on dead body. I guess it is a bug of the early alpha release.

Edited by TRex

Share this post


Link to post
Share on other sites

I think it's because they now kind of drop their stuff when they die. (Not sure how it works, but that was my impression so far)

In Arma 2 this would have worked.

Share this post


Link to post
Share on other sites

None of the item assignment commands seem to work on dead units. If there isn't a bug already, we probably should open one... Looks like a pretty old issue and it just now crossed my path when I tried to remove UAV terminals from dead units so that the UAV becomes disconnected.

Share this post


Link to post
Share on other sites

Does anybody have a workaround for this? I have a similar problem:

 

(multiplayer, dedicated server, group are all real players)

Group can have a fireteam leader which supposed to have a GPS. When he dies, second in command shall pick up his GPS but he is unable to loot it. Same goes for the map.

I tried it with onPlayerKilled event script to spawn a GPS inside the dead players backpack ( using oldUnit and newUnit from the event parameters ). Inside the script i tried:

 

(_this select 0) addItemToBackpack "ItemGPS"; ( i also tried "Item_ItemGPS", i saw that as the classname, too )

 

But it didn't work.

Is there a proper way to access dead player inventory? Next thing i would try is trying to get the position of the dead body and create a GPS "next to it". But GPS' are small and i would really like to have the loot effect.

 

Any help?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×