OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Leech on 14 Jan 2004, 01:00:16
-
there has to be something somewhere about a burn script of fire but i just cant find it--ive been told there are scripts here at ofpec
can a script do the job or do you have to have an addon?
--and i do have the ecp mod im not asking for any mods
-
You can download fire scripts, or you may be able to directly execute them through the ECP.
-
where can i get the scripts?
-
If ECP does what you want then take it to bits and see how it's done. Check the readme to see what their policy is before you use any of their stuff.
If ECP doesn't solve your problem, then tell us more about what you are trying to do.
There may be fire scripts in the Ed Depot, I can't remember.
-
[icarus_uk]'s fantastical superific drop particle array script. Patent pending.
Just copy and paste that into a sqs text file, all the strange added spaces will make the coloumns line up when wordwrap is deselected in notepad, this will allow for easier editing. Ive added the explanations of each value to the bottom of the script as well for your referance. I think you'll get the best results when you change the size, move velocity, mass and volume values. Although I like to think this creates a nice fire and smoke effect already.
---begin code snippet---
;Fire script by [icarus_uk]
;http://furryclan.net
;call with [objectname]exec "fire.sqs"
_object = _this select 0
_time = 0
#burn
;drop[ShapeName , "", Type , TimerPeriod, LifeTime , Position , MoveVelocity ,RotationVelocity,Weight , Volume ,Rubbing, Size , Color , AnimationPhase , RandomDirectionPeriod , RandomDirectionIntensity , OnTimer , BeforeDestroy , Object ]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(15), random(15), 30] , 0 , 1.2 , 0.2 , random(0.2), [random(3),random(5),0],[[1,1,1,1],[1,1,1,0]] , - , 0 , 0 , "" , "" , _object]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(10), random(10), 15] , 0 , 1.2 , random(0.2), random(0.2), [random(3),random(5),0],[[1,1,1,1],[1,1,1,0]] , - , 0 , 0 , "" , "" , _object]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(0.2), random(0.2), 0.5] , 0 , 1.2 , random(0.2), random(0.2), [random(3),random(5),0],[[1,1,1,1],[1,1,1,0]] , - , 0 , 0 , "" , "" , _object]
drop ["cl_basic", "", "Billboard", 5 ,random(10), [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(1), random(1), random(10)], 0 , 0.75 , 1 , random(1) , [1,random(10)+10] ,[[0,0,0,0.9],[0.4,0.4,0.4,0]] , - , 0 , 0 , "" , "" , _object]
_time=_time + 1
?_time >=1000:goto "exit"
goto "burn"
#exit
exit
Drop Global parameters:
ShapeName - Name of the shape associated with the particle.
AnimationName - Name of the animation of the shape.
Type - Type of the particle (either "Billboard" or "SpaceObject").
TimerPeriod - The period of calling the "OnTimer" event (in sec).
LifeTime - Life time of the particle (in sec).
Physical parameters:
Position - Either 3D coordinate (xzy) or name of the selection - in this case the Object property must be set.
MoveVelocity - 3D vector (xyz) which describes the velocity vector of the particle (direction and speed in m/s).
RotationVelocity - Float number which determines number of rotations in one second.
Weight - Weight of the particle (in kg).
Volume - Volume of the particle (in m^3).
Rubbing - Float number without dimension which determines the impact of the density od the enviroment on this particle. 0 - no impact (vacuum).
Render parameters: Note that all these values are set as arrays to show their development in time. F.I. if you set the array [1,2] as a size then at the beginning the size of the particle will be 1 and at the end of the life time of the particle it's size will be 2. The rest od the values during the life time will be lineary interpolated.
Size - Size of the particle in time to render (m).
Color - Color of the particle in time to render (RGBA).
AnimationPhase - Phase of the animation in time.
Random parameters:
RandomDirectionPeriod - Period of changing the velocity vector (s).
RandomDirectionIntensity - Each MoveVelocity component will be changed with random value from interval <0, RandomDirectionIntensity>.
OnTimer - Name of the script to run every period determined by TimerPeriod property. Position of the particle is stored in "this" variable.
BeforeDestroy - Name of the script to run right before destroying the particle. Position of the particle is stored in "this" variable.
Object - Object to bind this particle to.
---end of file---
-
wow thanks!
im a little confused tho--do i need to change/add anything in the script?--its not working
i pasted it into fire.sqs executed it but get error messages
-
The drop command takes a very large particle array, so there's a lot of potential screw-ups in one :P .
-
No screw ups, I dont think you called it as it says.
[quoth the script]
;call with [objectname]exec "fire.sqs"
[/quoth the raven]
You need to put a the name of an object or unit of building etc in the brackets. This will set fire to that object/building/unit etc. If its a pre built building you want to set fire to, you need to put the entire object ID, example:
[object 1120]exec "fire.sqs"
Another example you can use;
[evilgeneral]exec "fire.sqs"
You need to put a name in the brackets.
Incidently, if you want the fire to last longer (currently its set to end after 10 seconds or so), then increase the value in the line;
?_time >=1000:goto "exit"
Changing that 1000 value higher will make the fire last longer. However the fire does not burn its self out to an end, it just stops. So use how you wish.
-
no i called it correctly bfore-- tried it on editor placed objects, units, buildings, bushes--the script executed but a hundred error messages flashed
there must be a mistake in the text--this is exactly what i pasted into fire.sqs
;Fire script by [icarus_uk]
;http://furryclan.net
;call with [objectname]exec "fire.sqs"
_object = _this select 0
_time = 0
#burn
;drop[ShapeName , "", Type , TimerPeriod, LifeTime , Position , MoveVelocity ,RotationVelocity,Weight , Volume ,Rubbing, Size , Color , AnimationPhase , RandomDirectionPeriod , RandomDirectionIntensity , OnTimer , BeforeDestroy , Object ]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(15), random(15), 30] , 0 , 1.2 , 0.2 , random(0.2), [random(3),random(5),0],[1,1,1,1],[1,1,1,0] ,
, 0 , 0 , "" , "" , _object]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(10), random(10), 15] , 0 , 1.2 , random(0.2), random(0.2), [random(3),random(5),0],[1,1,1,1],[1,1,1,0] ,
, 0 , 0 , "" , "" , _object]
drop ["cl_fire" , "", "Billboard", 1 , 0.7 , [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(0.2), random(0.2), 0.5] , 0 , 1.2 , random(0.2), random(0.2), [random(3),random(5),0],[1,1,1,1],[1,1,1,0] ,
, 0 , 0 , "" , "" , _object]
drop ["cl_basic", "", "Billboard", 5 ,random(10), [ random(0.75)-2.5, random(0.75)-4, random(0.75)-1.5], [random(1), random(1), random(10)], 0 , 0.75 , 1 , random(1) , [1,random(10)+10] ,[0,0,0,0.9],[0.4,0.4,0.4,0] ,
, 0 , 0 , "" , "" , _object]
_time=_time + 1
?_time >=1000:goto "exit"
goto "burn"
#exit
exit
-
it works perfectly for me. I'll have a look at it, but I have no idea why it works for me and not for you.
-
version mabye?? im running 1.91 resistance
-
Its the forums fault, when you (or anyone) copy and paste it back into a text fire it doesnt keep the original line breaks, thus causing massive errors as the arrays are longer than a single line of the forums, thus splitting them in two. I cant be arsed to fight against the forums to get it working, so here it is on my website;
http://www.ickysworld.com/flashpoint/fire.sqs
-
wow!! awsome it works! :D
thanks a lot man!
-
Phew, good to know it works.