mcslavko 117 Posted October 10, 2017 does not launch the second exploding script _i = Random (3) _i = _i - (_i Mod 1) ? _i == 1: _t exec "\ffur_effects\fuelboom.sqs" any suggestions how to run it? talking about MP 1 Share this post Link to post Share on other sites
mcslavko 117 Posted October 11, 2017 I worked a bit and merged BAS and DKM scripts, it works OK . The question I have about the extra explosions triggered by this line: _x = random 70 ?_x <=1 && _lifeTick > 550:_bang = "mortarshell" createvehicle getpos _object Maybe you have an idea how to stop creating _bang after 30 seconds from the script initialisation? The entire script looks like this: ; BAS - Generic fire/damage script - by TJ march 2003 ? BAS_MPFIX:exit ;execute with name of object to burn ; eg, [<objectname>] exec "fire.sqs" ;burn time (in seconds) _lifeTime = 600 _object = _this select 0 _soundloop = 0 _delay = 0.23 _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks _ouch = 0 _count = 0 @ (getdammage _object) >=0.97 @ (getpos _object select 2) < 3 [_objects] exec "\ffur_effects\kia_sparksandshock.sqs" ? "Air" countType [_object] == 1: _gl = "logic" createVehicle [getpos _object select 0,getpos _object select 1,0]; _gl setpos getpos _object; _gl setDir (getDir _object); [_gl,_object,3] exec "\ffur_effects\dustwaveA.sqs" ? "LandVehicle" countType [_object] == 1: [_object,3] exec "\ffur_effects\dustwave.sqs" ? !( local _object):goto "sound" _posx = [getpos _object select 0, getpos _object select 1,1.5] _bang = "mortarshell" createvehicle _posx ~0.1 ~1.5 ? "LandVehicle" countType [_object] == 1 && random 1.0001 > 0.5: _logic = "logic" createVehicle getpos nearestObject [_object,"crater"]; _logic setpos getpos nearestObject [_object,"crater"]; [_logic,0,0 + random 0.2,10 + random 5] exec "\ffur_effects\hotground.sqs" ?! (local _object):goto "sound" _fire = "nmod_fire" createvehicle [0,0,0] _fire setpos [getpos _object select 0, getpos _object select 1,1.3] _fire inflame true _smoke = "nmod_smoke" createvehicle [0,0,0] _smoke setpos [getpos _object select 0, getpos _object select 1,2.5] _smoke inflame false #sound #Begin ;random explos ? ! (local _object):goto "client" _x = random 70 ?_x <=1 && _lifeTick > 550:_bang = "mortarshell" createvehicle getpos _object ?_x>=69 && _lifeTick >460:_bang = "bullet12_7" createvehicle getpos _object #client ;burn player ? player distance _object <10: player setdammage ((getdammage player) +0.01),goto "scream" #fire ;sparks drop ["cl_fire", "", "Billboard", 1, 5, [0,0,1], [ random 1, random 1, random 3], 1, 0.005, 0.0042, 0, [0.15], [[1,1,1,1],[0,0,0,0]], [0,1], 0.5, 1, "", "",_object] ~_delay _lifeTick = _lifeTick - 1 _fire setpos [getpos _object select 0, getpos _object select 1,1.3] _smoke setpos [getpos _object select 0, getpos _object select 1,2.5] ?_lifeTick > 0 : goto "Begin" deletevehicle _fire ~300 deletevehicle _smoke ~1 drop ["cl_fire" , "" , "Billboard" , 1 , 5 + random 5, [getpos _t select 0,getpos _t select 1,1.3] , [random 2 - random 2,random 2 - random 2,2 + random 2] , 1 , 1 , 1 , 0.2 , [random 0.09] , [[1,1,1,1],[1,1,1,0.75],[1,1,1,0.50],[0,0,0,0]] , [0,1] , 0 , 0.1 , "" , "" , ""] exit #scream ? _ouch == 1:goto "fire" ? !(alive player) goto "fire" _ouch = _ouch +1 ?side player == west:player say "eng31" ?side player == civilian:player say "eng31" ?side player == east:player say "rus16" ?side player == resistance:player say "eng31" player groupchat "MEDIC! I'm getting burnt here!" goto "Begin" Share this post Link to post Share on other sites
ProfTournesol 956 Posted October 11, 2017 Yes. The calculation of _lifeTick is at the beginning : _lifeTime = 600 _object = _this select 0 _soundloop = 0 _delay = 0.23 _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks Given the parameters, _lifeTick is equal to 600/0,23 which is equal to 2608. At each loop, _lifeTick decreases of 1. So you'll have a lot of bang loops before the end of the script. To stop the bangs after 30 seconds, you'll have to change the following line from ?_lifeTick > 0 : goto "Begin" To ?_lifeTick > 2578 : goto "Begin" Or something like that. 1 Share this post Link to post Share on other sites