Jump to content
Sign in to follow this  
onedigita

hide body script

Recommended Posts

_target=_this select 0

hideBody _target
~5
deleteVehicle _target
exit

this is all i have so far. I would like to make it so only a certain players have the ability to hide a dead body which would remove all there kit in the process to prevent opfor players to use against blufor in a MP setting.

Share this post


Link to post
Share on other sites
Guest

Maybe use cursortarget and if the cursor is on a dead body then add a addaction to delete the body?

Youd have to use a constant loop then though to check wether the cursor is on the dead body...if it is just grab the cursortargets return and use deletevehicle cursortarget.

Thats the best i can come up with...good luck.

Btw in that loop you can also check wether the player is (whitelisted) to use the deadbody function you made.

Share this post


Link to post
Share on other sites
Guest

There is a 'drag dead body' script created out there, I haven't tried it, and I don't know if it would work for your purposes, as technically it seems it does not actually 'remove' a body, but here is the link if it helps:

Drag Dead Body

Share this post


Link to post
Share on other sites

thats a neat script, maybe i might be able to find something. this was original from arma2 and it was an srs not sqf. im not even sure how it was called before but more ideas would def help!

Share this post


Link to post
Share on other sites

OK so looked at that drag scrip it looks very cool and i think ill keep it in possibly but heres the code for one of the actions in that script

 H8_fnc_Action = {
_dragCond = "vehicle _this != vehicle _target and isNull attachedTo _target and count attachedObjects _this == 0 and _target distance _this < 3";	
	{
_x addaction [H8_DRAGTEXT,{call H8_DragAction},nil,6,false,false,"",_dragCond];	
	}forEach _this;
};

now i have to figure out how I can get this

_target=_this select 0

hideBody _target
~5
deleteVehicle _target
exit

to work in that contex

Share this post


Link to post
Share on other sites

For whatever units you want this applied to (replace _unit with the respective unit reference):

_unit addEventHandler
[
"Killed",
{
	(_this select 1) addAction
	[
		"Hide Body",
		{
			sleep 5;
			deleteVehicle (_this select 0);
			hintSilent "Body has been hidden.";
			sleep 3;
			hintSilent "";
		},
		nil,
		6,
		true,
		true,
		"",
		"_this distance _target < 5"
	];
}
];

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  

×