OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: SaS TrooP on 27 May 2009, 17:15:34

Title: Body Removal
Post by: SaS TrooP on 27 May 2009, 17:15:34
How to remove body in multiplayer - I mean to sink it into the ground. I tried script from Mr. Murray editing Guide, implementing as it is said there, but game seems to ignore the script.

Anyone knows better script to solve my problem.

PS: I can quote Mr. Murray's scrip unfortunately.
Title: Re: Body Removal
Post by: JamesF1 on 27 May 2009, 19:59:46
What bodies are you trying to remove?  A simple example (though by no means a 'complete' body removal script) to remove player bodies on re-spawn would be something like this (called once from init.sqf):

Code: (hidePlayerBodies.sqf) [Select]
private ["_oldPlayer"];

for [ {_i = 0}, {_i<1000}, {_i=_i+1} ] do
{
waitUntil {not alive player};
_oldPlayer = player;
waitUntil {alive player};
hideBody _oldPlayer;
};
Title: Re: Body Removal
Post by: ModestNovice on 28 May 2009, 22:25:43
well Spooner's works very vell.

in init.sqf put:
Code: [Select]
waitUntil {alive player};
player addEventHandler ["Killed", {[_this select 0] spawn {hideBody (_this select 0)}}];

this works perfect in mp too ;).
Title: Re: Body Removal
Post by: Rommel92 on 29 May 2009, 11:37:32
Have a look at Dr Doolittle script pack, useful for some of the plug and play basics.