shark-attack 2 Posted June 2, 2007 guys im having problems hiding the bodies of fallen enemys unit init this AddEventHandler ["killed",{this addaction ["Hide Body","hidebody.sqs"]}] script _body = _this select 0 _act = _this select 2 _body removeaction _act #loop _body setpos [(getpos _body) select 0, (getpos _body) select 1, ((getpos _body) select 2) - 0.1] ~0.1 ? ((getpos _body) select 2) < -0.5 : exit goto "loop" problem is body isnt "swallowed" by ground ... it twitches and moves about but isnt removed any help more than welcome ... many thanx in advance Share this post Link to post Share on other sites
Nutty_101 0 Posted June 2, 2007 Hidebody function is what you want. Share this post Link to post Share on other sites
shark-attack 2 Posted June 2, 2007 played  with this  and it works  well  for deleting dead  how  would i include it with action many thanx Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted June 2, 2007 how do i use it ? again m any thanx <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hideBody _unitToRemoveWhenDead; You don't have to worry about deleting it later. The body is automatically deleted by the engine after it's been hidden. Likely it's automatic once the unit is X meters below ground. Share this post Link to post Share on other sites
Flat!!! 0 Posted June 2, 2007 Well you could do like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 1 ~100 hidebody _unit exit After 100 secs the body will sink into the ground. How do you mean with action? There should be a hidebody action if you get close to the dead unit. Share this post Link to post Share on other sites
shark-attack 2 Posted June 2, 2007 i dont  get  an  option to hide the body using hidebody ... it happens automatically Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted June 2, 2007 To clarify, you get the option to hide a body in your action menu if you're a special forces guy, not a regular. If you want to add this ability to regulars, look into the addaction command. Share this post Link to post Share on other sites
shark-attack 2 Posted June 2, 2007 thanx for clarifying this AddEventHandler ["killed",{this addaction ["Hide Body", what here]}] Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted June 2, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this AddEventHandler ["killed",{this addaction ["Hide Body","hidebody.sqs"]}] hidebody.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _body = _this select 0 _hider = _this select 1 _act = _this select 2 _body removeaction _act _hider playMove "AmovPercMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon" sleep 1 hideBody _body With this the guy will kneel more or less like the sf do when hiding bodies. Share this post Link to post Share on other sites
shark-attack 2 Posted June 2, 2007 thanx mate ... sorted ! Share this post Link to post Share on other sites
Flat!!! 0 Posted June 2, 2007 The above code will give you the possibility to hide the body from 100 meters? Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted June 2, 2007 Hehe, you may have a point there Flat, but I don't think the actions show up until you're about 10 meters away You can use this instead then: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_body = _this select 0 _hider = _this select 1 _act = _this select 2 ?((_body distance _hider) > 1):goto "exit" _body removeaction _act _hider playMove "AmovPercMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon" sleep 1 hideBody _body #exit exit Edit: Changed croc sign Share this post Link to post Share on other sites