pazuzu 21 Posted March 20, 2005 Has anyone here used the Utimate fire script by Igor Drukov? I'm trying to use it in a mission I'm making & I keep getting this bug where smoke & flames surround me & wont go away. It works for most of the mission but then always at some point I start getting this bug. Anyone familiar with this? Thanks. Share this post Link to post Share on other sites
Blanco 0 Posted March 20, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;script written by Igor Drukov (igordrukov@noos.fr) ;an actual compilation of original BIS and Vektorboson scripts. _object= _this select 0 _pos=getpos _object _lifeTime =35 _delay = 0.05 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks _x=getpos _object select 0 _y=getpos _object select 1 _z=getpos _object select 2 _i=0.01+getdammage _object #Begin _x=getpos _object select 0 _y=getpos _object select 1 _z=getpos _object select 2 _pos=getpos _object ?(random _lifeTicks) < _lifeTick : drop ["cl_fire", "", "Billboard", 1, random 5, _pos, [(_velocity select 0) + random 1, (_velocity select 1) + random 1, (_velocity select 2) + random 1], 1, 0.005, 0.0042, 0.2, [random 0.05], [[1,1,1,1],[0,0,0,0]], [0,1,0], 0.5, 0.5, "", "", ""] drop ["cl_basic", "", "Billboard", 1, 10, _pos, [0,0,1], 1, 0.005, 0.0042, 0.5, [0.2,10], [[0,0,0,0], [0.3,0.3,0.3,1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0.1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0]], [0,1,0,1,0,1], 0.2, 0.2, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 1.5, _pos, [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~_delay _object setdammage _i _i=_i*1.01 ?(getdammage _object)>0.95:goto "explo" _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin" #explo _object setdammage 1 _Unit = _object _Explosion = GetPos _Unit _cx = _Explosion select 0 _cy = _Explosion select 1 _cz = _Explosion select 2 ~0.75 _c = 50 _color = [[0.35,0.35,0.3,0], [0.2, 0.2, 0.1, 0.5],[0.2, 0.27, 0.15, 0]] _size = [2, 5] _size1 = [2, 15] _lifetime = 2 _step = 360 / _c _i = 0 ;Vektorboson again... always him ! #l1 _Explosion = GetPos _Unit _cx = _Explosion select 0 _cy = _Explosion select 1 _cz = _Explosion select 2 _vel = [sin(_i * _step)*15, cos(_i * _step)*15,0] _vel0 = [sin(_i * _step)*100, cos(_i * _step)*100, random 75-random 150] _vel1 = [sin(_i * _step)*15, cos(_i * _step)*15,random 15-random 30] ?_cz<1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel, 0, 0.2, 0.157, 0.001, _size, _color, [0], 0.1, 0.2, "", "", ""] ?_cz>=1:drop ["cl_basic", "", "Billboard", _lifetime, _lifetime, [_cx, _cy, _cz], _vel1, 0, 0.2, 0.157, 0.001, [5,15,25], _color, [0], 0.1, 0.2, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 0.75, [_cx, _cy, _cz+1], _vel0,1, 0.004, 0.004, 0.1, [random 5,random 25], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] _i = _i + 1 ?_i < _c: goto "l1" _tempobj = objNull _pos=getpos _object _lifeTime =45 _delay = 0.1 _velocity=[0,0,1] _lifeTicks = _lifeTime / _delay _lifeTick = _lifeTicks _x=getpos _object select 0 _y=getpos _object select 1 _z=getpos _object select 2 #Begin0 _x=getpos _object select 0 _y=getpos _object select 1 _z=getpos _object select 2 _pos=getpos _object ?(random _lifeTicks) < _lifeTick : drop ["cl_fire", "", "Billboard", 1, random 5, _pos, [(_velocity select 0) + random 1, (_velocity select 1) + random 1, (_velocity select 2) + random 1], 1, 0.005, 0.0042, 0.2, [random 0.05], [[1,1,1,1],[0,0,0,0]], [0,1,0], 0.5, 0.5, "", "", ""] drop ["cl_basic", "", "Billboard", 1, 10, _pos, [0,0,1], 1, 0.005, 0.0042, 0.5, [0.2,10], [[0,0,0,0], [0.3,0.3,0.3,1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0.1 * _lifeTick/_lifeTicks], [0.8,0.8,0.8,0]], [0,1,0,1,0,1], 0.2, 0.2, "", "", ""] drop ["cl_fire", "", "Billboard", 1, 1.5, _pos, [random 0.3, random 0.3, random 0.3], 1, 0.004, 0.004, 0.1, [5*(0.1 + 0.2 * _lifeTick/_lifeTicks), 5*(0.1 + 0.5 * _lifeTick/_lifeTicks), 5*(0.1 + 0.1 * _lifeTick/_lifeTicks)], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", ""] ~_delay _object setdammage _i _i=_i*1.1 _lifeTick = _lifeTick - 1 ?_lifeTick > 0 : goto "Begin0" exit Share this post Link to post Share on other sites
pazuzu 21 Posted March 20, 2005 Thats the script.... Any ideas why it's creating smoke & flames all around me? It does this with out me crashing or being hit by enemy. It just starts happening. Share this post Link to post Share on other sites
Blanco 0 Posted March 20, 2005 That's not a bug, the scripts doesn't check for any damagevalues. The fire starts immediately when you run the script. But why don't you add a condition in the beginning? something like : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> @ getdammage _object >= 0.8 Or via a "dammaged" or "hit" eventhandler? Share this post Link to post Share on other sites
redface 1 Posted March 21, 2005 pazuzu, it seems that you are adding the script to yourself ... add it to the unit or the vehicle that you want to be burning cool script btw Share this post Link to post Share on other sites
Blanco 0 Posted March 21, 2005 Actually, the one above is an old version. You can download the final version Here (demomission included), it's one of the best firescripts around imo, but you'll need a strong computer. Share this post Link to post Share on other sites
pazuzu 21 Posted March 21, 2005 I just made a trigger for each plane I used it on. For condition I put: "(damage mig1) > .7". Without the quotes... For Activation I put: "[mig1,[0,-9.6,0],0.5] exec "UltimateFire.sqs" mig1 is the enemy plane & there are 20 of them total. Could it be that it cant be used for more than one vehicle? Maybe 20 is too many? I also tried adjusting the size of fire from 0.2 to 5 & I changed the height which in the demo mission was set to look like a tail rotor fire & then a rocket on fire...I made it so it trailed out the back of planes. Did you try it for more than one vehicle? Sometimes it takes a while for this bug to happen....I can be 3/4 of the way through the mission(30min or so) & then I get ingulfed by smoke & fire. Maybe my house is on fire... Thanks for the help. Share this post Link to post Share on other sites
Blanco 0 Posted March 22, 2005 Yes, I tried it with multiple objects, it were 4 or 5 buildings, but I don't think that matters Instead of putting 20 triggers on your map, why dont you just add the condition in the script itself? ;=========Top======== ;script written by Igor Drukov (igordrukov@noos.fr) ;an actual compilation of original BIS and Vektorboson scripts. ;vehicle _object= _this select 0 ;relative position of fire to vehicle _ox=(_this select 1) select 0 _oy=(_this select 1) select 1 _h=(_this select 1) select 2 ;size of fire and consequent inflicted damage _size=_this select 2 ;====> insert here @getdammage _object >= .7 ...and then the rest of the script... Share this post Link to post Share on other sites
pazuzu 21 Posted March 22, 2005 Hmm, I dont know anything about scripting... This line: @getdammage _object >= .7 Would I have to make this line 20 times? Ones for each mig? And would any of this matter when it comes to this bug I get? Thanks for the reply. Share this post Link to post Share on other sites
Blanco 0 Posted March 22, 2005 Don't know that's the problem, but a lot of triggers can be a bitch sometimes. No, you can use 1 script for all units. That condition line replaces the 20 triggers. Just run the script as normal. For example : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this,[0,-9.6,0],0.5] exec "UltimateFire.sqs" ...in the init of your vehicle, object, unit,... whatever Share this post Link to post Share on other sites
pazuzu 21 Posted March 22, 2005 Hmm, I just tested it & its even worse now. I tried it on the C130 I have in map & when I shoot it down the trail of smoke looks great but after it crashes on the ground the fire keeeps growing bigger & bigger until I'm surrounded by flames. Here is how I added the condition: ;script written by Igor Drukov (igordrukov@noos.fr) ;an actual compilation of original BIS and Vektorboson scripts. ;vehicle _object= _this select 0 ;relative position of fire to vehicle _ox=(_this select 1) select 0 _oy=(_this select 1) select 1 _h=(_this select 1) select 2 ;size of fire and consequent inflicted damage _size=_this select 2 @getdammage _object >= .7 _i=0.01+getdammage _object ;speed of destruction (not an external variable) _inc=0.001 stopfire=1 _wait=0.001 #Begin In condition field of plane I want to burn: [this,[0,-9.6,0],0.5] exec "UltimateFire.sqs" Is that what you meant or is it in the wrong place? Thanks again. Share this post Link to post Share on other sites
Blanco 0 Posted March 23, 2005 Quote[/b] ]...after it crashes on the ground the fire keeeps growing bigger & bigger until I'm surrounded by flames. Well, that's what the script does. Â The fire grows as well as the damage, that's the part I like about this firescript, the fire lives. You have to define the position of the fire and the size of the fire when it starts to burn. When damage is higher then 0.95, it explodes with debris and keeps on burnin' and smokin' for a while I tried it with four A10's and it worked perfect. Btw : a unit has no condition field, (actually it has a condition of presence field, but that's not the one you need), run the script in the initialisation field. Share this post Link to post Share on other sites
pazuzu 21 Posted March 24, 2005 Triggers are used in the demo mission so thats what I used. I tried puting the condition in the script itself but I must not have placed it right. Could you show how you set it up? At the ofpec forum someone told me it wasn't good for multiple vehicles. Thanks for the help. Share this post Link to post Share on other sites