Home   Help Search Login Register  

Author Topic: move dead body below ground  (Read 1112 times)

0 Members and 4 Guests are viewing this topic.

Offline myke13021

  • Contributing Member
  • **
  • Myke
move dead body below ground
« on: 16 Apr 2004, 21:19:03 »
well, i guess this is a very basic problem, but neither in the ED depot nor a search on the forums has given me any results.

I want to delete dead bodies to eliminate lag. Well basically no problem, all works fine with one exception...i like to move the dead bodies slowly into the ground (like Black Ops can "Hide bodies"), not just delete them.

I tried it with setpos commands in a loop which would set it slowly below ground but this doesn't work.

i know the script itself works fine, i've tried to setpos the units slowly higher and higher above ground for testing (looks funny the dead bodies flying up in the sky  ;D)

If someone knows how i can dig these bodies, please tell me

Dutch Flander

  • Guest
And also
« Reply #1 on: 16 Apr 2004, 21:47:39 »
That is my problem too! But I have another problem:
In multiplayer games the dead bodies can submerge automatically if there are too much. But not every soldier can disappear. For example: a simple soldier with M16 and Pistol (Beretta) can go underground, but a sniper with M21 can't!!! I watched a multiplayer deathmath war with AI soldiers. After a long time every solder disappeared exept the snipers, or soldiers with M21. I had to write a script running in every soldier that have M21. In that script I removed (deleted)  the soldiers weapon (M21) after his death and boom. The soldier or sniper with no weapon can disappear!
How? Why?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #2 on: 16 Apr 2004, 22:01:27 »
Well, the M21 inherits from SniperRiffle, and in SniperRiffle there is these lines in the config.

valueWeapon = NEVER_DESTROY;
valueMagazine = NEVER_DESTROY;

That might explain it.


Planck
« Last Edit: 16 Apr 2004, 22:02:49 by Planck »
I know a little about a lot, and a lot about a little.

Dutch Flander

  • Guest
Re:move dead body below ground
« Reply #3 on: 16 Apr 2004, 22:15:48 »
If it is true, then I'm gonna "fix" it!!!!!
And why can't it be destroyed? For what reason? I can't understand!

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #4 on: 16 Apr 2004, 22:21:22 »
uhm...with all due respect, lads...but does anyone knows the answer for my problem too? or should i open a new thread for?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #5 on: 16 Apr 2004, 22:27:41 »
Myke.....If I had an answer I would have posted it, you will just have to be patient till someone who does have an answer sees your post.


Planck
I know a little about a lot, and a lot about a little.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #6 on: 16 Apr 2004, 22:39:57 »
i'm sry, i think my last post was a little too rude....wouldn't offend any1...i just felt a little "left out"  ;D

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #7 on: 16 Apr 2004, 22:54:11 »
Try posting the script you are using to 'sink' the bodies, maybe we can spot any obvious errors.


Planck
I know a little about a lot, and a lot about a little.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #8 on: 16 Apr 2004, 23:19:01 »
ok, here's the script

;delbody.sqs
?!(local server): exit
_dude = _this select 0
_ab = 0
removeallweapons _dude
~15
#loop
_ab = _ab + 0.01
_dude setpos [getpos _dude select 0, getpos _dude select 1,(getpos _dude select 2) +_ab]
?(_ab >= 3.5): goto "end"
~0.01
goto "loop"

#end
deletevehicle _dude
exit


As the script is now, all dead bodies fly upwards...i did this to test if the setpos command does it's work. I thought when i change the +_ab to a -_ab in the setpos line, the body will sink into the ground but it doesnt.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #9 on: 16 Apr 2004, 23:23:07 »
I concur, I tried a similar script.

Similar to yours, with the same 0.01 value.

The body does not sink into the ground.

The script does run, you can see the body flicker slightly, but no sinking.


Planck
I know a little about a lot, and a lot about a little.

csde-PiLLe

  • Guest
Re:move dead body below ground
« Reply #10 on: 17 Apr 2004, 00:05:27 »
Well, as it seems, the game is trying to keep things from sinking into the ground. There might be a solution in the BlackOps, but I also failed to find it.

I have had similar problems when I tried to create a "crashlanded blackhawk" using a script. I wanted it to be halfway under ground, but that did not work. So I used a "premade" addon instead of a script.

I chose to simply delete dead bodies if there are lots of people in a mission. But "plopp, you're gone" seems a little weird looking at it.

I have not yet done particle scripts, but wouldnt it be possible to create a few green or red smokelets, wait a few secs, delete the body? That "could" look like they are "dissolving" and not just deleted.

Just my 2 cents ;)

Cheers
PiLLe

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #11 on: 17 Apr 2004, 00:26:39 »
The reason Black Ops....etc, can hide bodies is because they have :

canHideBodies = true;

in theur config entry.

Normal soldiers do not.



Planck
I know a little about a lot, and a lot about a little.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #12 on: 17 Apr 2004, 02:18:04 »
well, i think i remember i've seen this "hide dead body" effect in a map...and if i could remember which, i would de-pbo it to see how it was done there.

And as this would not be done by a certain unit but from a script, i don't think it does matter if any unit on the map has this CanHideBodies....imo this does only mean if unit has this action or not.

:edit:
if i can't find another way, i'll keep the script as it is...it is funny to see "people go to heaven"...lmao :D

:edit:edit:
hmmm...as the black ops use an action command to hide the bodies, can it be there IS already a script in OFP which does the effect? how could i find this out?
« Last Edit: 17 Apr 2004, 02:22:31 by myke13021 »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:move dead body below ground
« Reply #13 on: 17 Apr 2004, 12:12:30 »
I don't know if you can add the action to hide bodies in description.ext files or scripts, but I think not.
I think if you need a unit to have this ability, it needs to be declared in the config.cpp.

I don't think setposing your bodies upwards will work either, you can setpos them up, but they fall to ground again afterwards.

Actually I tried this with a Jeep, I setposed it from the ground to 1000 m, using a trigger.
Of course, it came back down again, and....... it was undamaged.

I even tried it with myself sitting in the jeep as driver, both I and the jeep were able to drive away once we got back to ground level.

If you do this with a soldier, or yourself, both will die.


Although I have been unable to setpos a soldier, dead or alive, partially or completely, under the ground, I can do this with other objects..... i.e. ......the Jeep.

You can even have yourself or another soldier in the jeep at the time.
You can bury a jeep completely, but as long as you remember its location, you can still get in........and drive away.


I know, I know..........I have too much time on my hands.



Planck
I know a little about a lot, and a lot about a little.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #14 on: 17 Apr 2004, 15:04:16 »
pmsl...too much time...yes, i agree

but thanks for trying all these things out.

I know that units setposed above ground will fall back...you m8 have overseen the deletevehicle command at the end of the script....well..i think i keep it as it is, as it looks funny anyway....i just hope i don't get collisions with planes or choppers ("mayday, mayday...we were hit by an upwards flying dead body" ..."ya sure, and i bet his name was Jack Daniels")

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:move dead body below ground
« Reply #15 on: 20 Apr 2004, 20:27:40 »
YES!!!...i got it...it works...and it is so f***in simple, i could cry!!!

To smoothly hide dead bodies in ground it just needs.....a blackop.

For all those who like to know, here's a how to:

Create a Black Op somewhere on your map...he hasn't to be close, so put it where it can't be seen...on a offshore island i.e

Name this guy (Bodyhider i.e.)

make a script for deleting dead bodies like this one:

;delbody.sqs
?!(local server): exit
_dude = _this select 0
removeallweapons _dude
~60
bodyhider action ["hidebody", _dude]
~10
deletevehicle _dude
exit


make this script launched with eventhandler "killed"...et voilà...dead bodies sink smoothly into ground before they get deleted
« Last Edit: 20 Apr 2004, 22:04:08 by myke13021 »