Comrades in Arms Discussion Board

Full Version: delete dead bodies with effects
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hiho,

i'm working on a very special mission and need some special help Smile

I want a script which delete dead guys instantly (<1sec) and create a "smoke puff" at same time. It should look like "a soul is leaving the body" or something like this. It must also work in big heights and the smoke should disappear in few secs.
The script does not work for everybody, just for the units i want (check over the name or execute on every unit via Init line).

Who can help me with it?

greets
rue
Easiest way to do this would probably be to use an event handler. In the init field of the guy that should evaporate add something like

this addEventHandler ["killed", { _this spawn { sleep 0.5; deleteVehicle (_this select 0); }];

to get the body to vanish immediately. For the puff of smoke, you could add a particle system emitter and delete it as well after a few seconds. Can't write the code for that from the top of my head without experimenting in game, but the basic functionality is described here.
this addEventHandler ["killed", { _this spawn { sleep 0.5; deleteVehicle (_this select 0); }];  -> not working, cant save the init line
 
I'm a bad scripter too. If i have luck i can understand the half of it. already know the link and tryed different commands, also tryed examples by other people but most of it failed...

is there a way that you can create the script?
It's missing a closing } at the end:
this addEventHandler ["killed", { _this spawn { sleep 0.5; deleteVehicle (_this select 0); }}];