Author: Mr-Murray
Author Website: http://www.mr-murray.de.vu

Requirements: No addons required

Version: 1.0

Short description:

Date: 2007-05-12 19:37


Comments: (0)
Rating:



 

Delete-dead bodies-example
by
Mr-Murray


Description:
With this editor example I show you how to delete dead bodies or destroyed vehicles.


Usage:
-----
You can copy & paste this example very easy into your existing mission.
Or you can use the "Merge" option in the editor and import this example into your mission.

You just need one of the two triggers and the dummy called with the name 'Gravedigger', which you can place somewhere far away from the action on the map. Then you just need:
    1 File:
    * Bodydelete.sqs

In this you can define with one word if only dead bodies are deleted or vehicles too.

Bodydelete.sqs
_W=_this select 0
_L=[]+thislist
_A=[]
_G=[]
_T="Man"

{ if (_T counttype [_x] == 1) then {_G=_G+[_x]} } foreach _L

#Check
{ if (not alive _x) then {_A=_A+[_x]} } foreach _G
_G=_G-_A
? count _A > _W :_P=_A select 0;_A=_A-[_P]
(Gravedigger) action ["hidebody",_P]
~6
deletevehicle _P
? count _A == _W and count _G == 0 :exit
goto "Check"


In line 5 you just change:

_T="Man"

replace it with:

_T="Land"

That's all. In line 13 the dummy called 'Gravedigger' just runs the Hidebody-Animation.
This causes that the units disappear slowly in the ground before they are deleted.
With vehicles that can't be done, those are directly deleted.

In the trigger you now can define if only units from one side or from all are deleted.
For sidereferred you select the respective side (west, east, etc.) and for all simply EVERYONE.

Now you can specify how many dead or destroyed units still remaining on the battlefield.
For that the value in brackets [] is intended. In the example all but 2 units are deleted.

[2] exec "bodydelete.sqs"

This syntax is located in the trigger (see editor example!).


Much fun wishes Mr-Murray!

http://www.mr-murray.de.vu
http://www.mapfact.net

Translation by W0lle




Enable javascript to be able to download from Armaholic please!



Tags: No tags