Home   Help Search Login Register  

Author Topic: Dead Body remover (OBSOLETE)  (Read 8078 times)

0 Members and 3 Guests are viewing this topic.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Dead Body remover
« Reply #15 on: 20 Mar 2007, 22:16:07 »
satexas69, do not double post.

Why is it that almost every single thread started I have to come and say that..  :no:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline satexas69

  • Members
  • *
Re: Dead Body remover
« Reply #16 on: 21 Mar 2007, 06:29:48 »
Huh? I didn't respond to myself...

One post was for myke and that discussion, one was for trashcan...

2 different conversations, one tread - is that REALLY that bad?

And I believe you've only ever warned me once before.. maybe you have me confused?

I even edit my own posts now for updates, have for weeks... I'm  ???  ???  ???

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Dead Body remover
« Reply #17 on: 21 Mar 2007, 08:43:19 »
i think what h- meant was that there's a double post in pretty much any thread started nowadays, not your threads in particular.

if you wish to answer points from many people, use one post and the @ symbol to identify whose point you are replying to. it keeps the forums free of clutter, such as these last 3 posts.

back on topic please folks.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Dead Body remover
« Reply #18 on: 23 Mar 2007, 10:28:36 »
I personally think the best dead body removal system, is one that
    a) works of a killed event handler
    b) The event handler script then
         b1) Adds the unit to a deadbody array
         b2) Counts the array
         b3) If the array count is above the count limit (Adjustable variable), then removes the first elements of the array until the count is acceptable

    This way you dont continuously run looping scripts and you keep enough dead bodies on the map for scavenging weapons etc

    far more efficient than
    ~120
    deletevehicle Deadman
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline satexas69

  • Members
  • *
Re: Dead Body remover
« Reply #19 on: 03 Apr 2007, 00:49:12 »
Terox,

True, but also false.

I don't "want" dead bodies lying around when I'm using unlimited respawn AND using Toad's script that gives you back the weapons you were holding when you died.

Besides, if you want bodies lying around, just set the "timer" to a much higher value.

Offline Rambo16AAB

  • Members
  • *
Re: Dead Body remover
« Reply #20 on: 06 Apr 2007, 20:06:03 »
Is there an easy war to remove dead bodies & vehicles without the need for AI ( for use in an AI free map ) ?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Dead Body remover
« Reply #21 on: 06 Apr 2007, 20:14:24 »
Terox,

True, but also false.

I don't "want" dead bodies lying around when I'm using unlimited respawn AND using Toad's script that gives you back the weapons you were holding when you died.

Besides, if you want bodies lying around, just set the "timer" to a much higher value.


how you do it is entirely up to you, what i was trying to point out was, that any system that runs a "countdown timer" on an indivdual unit is not the most efficient system to use

eg 10 dead bodies with 10 looping scripts is far less efficient that no looping scripts

Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline FreeBird

  • Members
  • *
Re: Dead Body remover
« Reply #22 on: 07 Apr 2007, 10:28:27 »
Is there an easy war to remove dead bodies & vehicles without the need for AI ( for use in an AI free map ) ?


Yes,write in their init;

Code: [Select]
this addeventhandler ["killed",{HideBody (_this select 0)}]
Call [This,Birth,School,Work,Death]execVM "Storyofmylife.sqf"
(_this select 1)ObjStatus "DONE";(_this select 2)ObjStatus "DONE";(_this select 3)ObjStatus "ACTIVE";(_this select 4)ObjStatus "HIDDEN";
if not((_this select 0) IsKindOf "Human")ExitWith{PlayMusic"Goodbye Cruel World"}

Offline Rambo16AAB

  • Members
  • *
Re: Dead Body remover
« Reply #23 on: 07 Apr 2007, 11:24:27 »
Thanks.

Does this still require the SQS file from page 1 to work, or is this  all I need to do ?? ( not familure with scripting so please excuse the questions ).
Does that work for vehicles and will it stay in the Init after a respawn ??

thanks.

Offline FreeBird

  • Members
  • *
Re: Dead Body remover
« Reply #24 on: 07 Apr 2007, 13:50:19 »
Code: [Select]
this addeventhandler ["killed",{HideBody (_this select 0)}]is good for COOP missions,write it in the AI init field and they sink in the ground when killed (a la BF2)

**For MP missions with respawning players U better edit your respawnscript who will run anyway when killed;

Code: [Select]
@playerRespawnTime == 0
HideBody _unit

somewhere on the end of your script (_unit can be passed by EH killed -->_this select 0)

**If you have a very basic mission without respawnscript you can do it like this:
-in init.sqs:
Code: [Select]
player addeventhandler ["killed",{_this exec "delete.sqs"}]-delete.sqs:
Code: [Select]
_corpse = _this select 0
player removealleventhandlers "killed"
@playerRespawnTime == 0
HideBody _corpse
player addeventhandler ["killed",{_this exec "delete.sqs"}]
exit

Note:No doubt SQF will fit better here as this script will be executed many times.

EDIT:The vehicle question:U need DeleteVehicle _wreck (instead of HideBody _unit),but there is no "sink into the ground" effect.
Call [This,Birth,School,Work,Death]execVM "Storyofmylife.sqf"
(_this select 1)ObjStatus "DONE";(_this select 2)ObjStatus "DONE";(_this select 3)ObjStatus "ACTIVE";(_this select 4)ObjStatus "HIDDEN";
if not((_this select 0) IsKindOf "Human")ExitWith{PlayMusic"Goodbye Cruel World"}

Offline Rambo16AAB

  • Members
  • *
Re: Dead Body remover
« Reply #25 on: 07 Apr 2007, 23:25:46 »
thanks, ill give it a go.