I want to create a script for CTF & C&H (Not Coops) to be run by the server
That
1) Removes dead bodies
2) Removes AI created by players leaving the server
So far I have got
------------------------------------------------------------------------------------------------------------------
Init.sqs entry[]exec "Removecorpse.sqs"
------------------------------------------------------------------------------------------------------------------
;Removecorpse.sqs?(!local server):exit
gamestatus = "RUNNING"
_n=-1
#loop
?(count (list EVERYUNIT) < 2):goto "loop"
_curlist = list EVERYUNIT
#loop2
_n = _n + 1
?(!alive (_curlist select _n)): [(_curlist select _n)] exec "delbody.sqs"
?(_n < (count _curlist)):goto "loop2"
_n=0
?(gamestatus != "FINISHED"): goto "loop"
exit
-----------------------------------------------------------------------------------------------------------------
;Delbody.sqs_u = _this select 0
~62
; I use 62 seconds because i have dead flag runners returning the flags after 60 seconds
_u setpos [0,0,99999]
deletevehicle _u
exit
--------------------------------------------------------------------------------------------------------------------
The above removes the corpses
I want to add to this, something to delete the AI created by folks disconnecting
Thanks for a previous posts answer
? (unitName != player) : deleteVehicle unitName
I have the possible answer
Another thing that has been thrown at me was that should the above quoted line be
?(unitName !=
local player) : deleteVehicle unitName
This has totally thrown me
Because the only way to test this is to have a dedicated server and 2 clients to test it on, i am having problems.
So if one of you greater than i scripters could sort this out, i would be eternally thankfull