OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: cornholio on 07 Jul 2003, 21:58:15

Title: Lag-Eliminator (deleting stuff)?????
Post by: cornholio on 07 Jul 2003, 21:58:15
Hi all ;D

I've searched but only found the "Lag-eliminator" script by
dreaming_adam. I can't get it to work. Does anybody know of
any other scripts to delete dead bodys and (or)
vehicals and stuff after you've left that part of the map?

TIA

corno

Title: Re:Lag-Eliminator (deleting stuff)?????
Post by: _hammy_ on 08 Jul 2003, 03:13:29
jsut use the deletevehicle command, but some peeps has had some problems with it deleted dead units...

deletevehicle <object>

or... if that dont work try this:

but first, create a gamelogic far far away from where all the action is.
<object> setpos getpos <gamelogic>

the line above does not accually delete the object, but it moves it so the player cant see therefore removing lag.
Title: Re:Lag-Eliminator (deleting stuff)?????
Post by: cornholio on 08 Jul 2003, 11:13:51
Hey HAMMY  ;D

You mean that I can have tons of units, vehicles ect... and as long as they are not in my view, they are not causing lag ???

I've heard of missions where the dude deleted like an entire base (everything that was put on the map using the editor) as soon as the player was out of the area or done with that OBJ. I've also heard that dead bodys (even out of view) will create lag.
I just can't find any script like that anywhere and am too new to write one myself :P

I'll try your scond suggestion for sure HAMMY and thanx for responding ;)

anyone else know of a script like this?

Cheers

corno
Title: Re:Lag-Eliminator (deleting stuff)?????
Post by: Zombie on 09 Jul 2003, 11:20:57
I use this all the time and it works fine:
file name ap.sqs
_body = _this select 0

?(_body == FlagOwner flagname):Goto "Flag"

?(_body != FlagOwner flagname):Goto "Delete"

#Flag
~30
DeleteVehicle _body

#Delete
~15
deleteVehicle _body

exit  

them make a trigger for each unit, condition !alive unitname
on activation [] exec "ap.sqs"

Probably and easier way using arrays instead of a lot of triggers, but this has always worked for me
Title: Re:Lag-Eliminator (deleting stuff)?????
Post by: Zombie on 09 Jul 2003, 11:26:48
for deleting units after I am done with them, like cutscene actors, I use:
unitname setpos (getpos graveyard)
deletevehicle unitname

where graveyard is a gamelogic off in the corner of the map

and I just call these from a script, usually my cutscene script if they are "actors"