Home   Help Search Login Register  

Author Topic: Lag Eliminator  (Read 1465 times)

0 Members and 1 Guest are viewing this topic.

LAPD

  • Guest
Lag Eliminator
« on: 25 Jan 2003, 16:54:40 »
I followed dreaming_adam's tutorial about deleting dead bodies in MP match. I did exactly what the tutorial says:
Quote
STEP ONE:

Insert a trigger central on the map. Set the x and y axis fields to 99999, set the ACTIVATION to ANYBODY, and set it to REPEATEDLY.
Next set its name to EVERYUNIT.

STEP TWO:

Leave the editor and set up the following scripts.

clearcorpse.sqs

#loop
_eunit = list EVERYUNIT
"?(!alive _x):[_x] exec {delbody.sqs} foreach _eunit
goto "loop"
exit


delbody.sqs

_u = _this select 0
~60
_u setpos [0,0,99999]
deletevehicle _u
exit


In the delbody.sqs file, the ~60 is the delay before the body will be removed.

Place these scripts in your missions folder (usually c:\program files\codemasters\operation flashpont\users\yourname\mpmissions\yourmissionname\ ) and then put "[] exec {clearcorpse.sqs}" in any units init field, or in INIT.SQS.

It dosen't work. When I tried changing something it slowed the game so much that I couldn't move. What to do?

Also, i did't understand the last line in the tutorial:
Quote
This script will work for units that are created runtime

Thanks  :)

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Lag Eliminator
« Reply #1 on: 25 Jan 2003, 17:10:11 »
1) place the following line in your init.sqs file

[]exec "Clearcorpse.sqs"

then

2) insert the following scripts into your mission's folder

Quote
;;clearcorpse.sqs
?(!local server):exit
gamestatus = "RUNNING"
_n=-1
#loop
~62
?(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

Quote
;;delbody.sqs
_u = _this select 0
_u setpos [0,0,99999]
deletevehicle _u
exit


the wait 62 seconds (~62) is to stop dead flag runners from disappearing if there is a 60 second flag return delay

you can delay it by whatever you want
Basically every 6o seconds this cyscles and removes dead bodies

i dont see the point of having it recycle any quicker than once/ minute and even that may be a bit to often


there is no need for triggers etc


also of interest is Tacticians tutorial about removing ai  created by the server when a player disconnects
« Last Edit: 25 Jan 2003, 17:16:18 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LAPD

  • Guest
Re:Lag Eliminator
« Reply #2 on: 25 Jan 2003, 22:09:23 »
Thanks Terox, that's great.  :)
Topic solved.  :D