OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: deaddog on 07 May 2003, 03:50:06
-
I placed a "killed" event handler in the init line of about 20 armored units. These call a burning vehicle script when activated. No problems here. Vehicle dies...Vehicle burns (and looks cool doing it) 8).
The problem comes when retrying a saved game. The resulting lag is ferocious. This happens even if no vehicles were destroyed. I removed the eventhandlers and the lag disappeared after doing a retry.
Has anyone experienced this? ???
Thanks ;)
-
it hapened 2 me :-X
i think dat we shud avoid usin eventhandlers wen posivble ;D
like u can use not alive trigers (or script) 8) ;D
LCD OUT
-
Well, that stinks. :) at least it's not just me, though.
i think dat we shud avoid usin eventhandlers wen posivble
Or never die so we don't have to retry.. ;D
Thanks
*update*
this script does the same thing:
_u=[bmp1,shilka10,shilka1,brdm1,t80guard,bmp87,bmp5,bmp6,t72b,mi2,mi24_2,mi17_1,t72patrol1]
_u=_u+t72patrol2,bmppatrol1,bmppatrol2,brdm2,bh1,ah64_1,m113_1,m2a2_4,m2a2_3,m1a1_1,m1a1_2]
_u=_u+[m2a2_1,bh9,bmpdol]
#loop
?count _u==0 or !alive player:exit
~4
_v=[]
{if (!alive _x) then {_v=_v+[_x]}} foreach _u
?count _v > 0:_u=_u-_v;{[_x] exec "ultimatefire.sqs"} foreach _v
goto "loop"
Basically, I start with an array of all the vehicles I want to check. When they are dead the burn script gets called for that vehicle. It then gets deleted from the main array so it won't be checked again. Plus, the more vehicles that are destroyed, the faster this will run.