Home   Help Search Login Register  

Author Topic: Burning Vehicles?  (Read 3416 times)

0 Members and 1 Guest are viewing this topic.

Offline XCess

  • Former Staff
  • ****
Re:Burning Vehicles?
« Reply #15 on: 20 Oct 2002, 14:35:25 »
Haven't u dePBOd res. Just look in 10WhenFightingEnds.Noe (think thats what it's called) and look in the editor (or script, can't remember where)

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Burning Vehicles?
« Reply #16 on: 20 Oct 2002, 14:59:44 »
jesus just help the poor git - even tho he didnt search at all  >:(

here are the 4 script you will need to make the fire...

fire.sqs

Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_intensity = _this select 3
_object = _this select 4
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks

#Begin

drop ["cl_fire", "", "Billboard", 1, 1.5, _posDrop, [(_velocity select 0) + random 0.3, (_velocity select 1) + random 0.3, (_velocity select 2) + random 0.3], 1, 0.004, 0.004, 0.1, [(0.1 + 0.2 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.5 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.1 * _lifeTick/_lifeTicks) * intensity], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", _object]

~_delay

_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"

firesource.sqs

Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_intensity = _this select 3
_object = _this select 4

; Fire
[_posDrop, [0,0,0], _lifeTime, _intensity, _object] exec "fire.sqs"

; Spark
[_posDrop, _velocity, _lifeTime, _object] exec "spark.sqs"

; Smoke
[_posDrop, _velocity, _lifeTime, _object] exec "smoke.sqs"

spark.sqs

Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_object = _this select 3
_delay = 0.2
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks

#Begin

?(random _lifeTicks) < _lifeTick : drop ["cl_fire", "", "Billboard", 1, random 5, _posDrop, [(_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, "", "", _object]

~_delay

_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"

smoke.sqs

Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_object = _this select 3
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks

#Begin

drop ["cl_basic", "", "Billboard", 1, 10, _posDrop, _velocity, 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, "", "", _object]

~_delay

_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"

those 4 script are needed - and here is how to activate it:

Code: [Select]
[[2402.607,9740.151,0], [0,0,1], 100, 5, "" ] exec "firesource.sqs"
the numbers at the start are co-ords on the map - use camera.sqs to find the ones you want. the [0,0,1] are posistion relative to that co-ord - this one makes it higher by 1. the 100 is number of seconds it burns for, 5 is intensity. The "" you can write the name of the vehicle if you want - makes no difference as far as i see.

hope that helps.
« Last Edit: 20 Oct 2002, 15:01:36 by Messiah »
Proud Member of the Volunteer Commando Battalion

MaZ

  • Guest
Re:Burning Vehicles?
« Reply #17 on: 29 Oct 2002, 02:17:43 »
Coming straight from the decompiled resistance mission:

Script For Fire:
Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_intensity = _this select 3
_object = _this select 4
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks

#Begin

drop ["cl_fire", "", "Billboard", 1, 1.5, _posDrop, [(_velocity select 0) + random 0.3, (_velocity select 1) + random 0.3, (_velocity select 2) + random 0.3], 1, 0.004, 0.004, 0.1, [(0.1 + 0.2 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.5 * _lifeTick/_lifeTicks) * _intensity, (0.1 + 0.1 * _lifeTick/_lifeTicks) * intensity], [[1,1,1,0], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0,1,0], 0.5, 0.05, "", "", _object]

~_delay

_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"

;WOULD BE CALLED USING A LINE LIKE:
;[[2402.607,9740.151,0], [0,0,1], 100, 5, "" ] exec "fire.sqs"


Script For Smoke:
Code: [Select]
_posDrop = _this select 0
_velocity = _this select 1
_lifeTime = _this select 2
_object = _this select 3
_delay = 0.3
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks

#Begin

drop ["cl_basic", "", "Billboard", 1, 10, _posDrop, _velocity, 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, "", "", _object]

~_delay

_lifeTick = _lifeTick - 1
?_lifeTick > 0 : goto "Begin"

;WOULD BE CALLED USING A LINE LIKE (to create smoke for the above fire):
;[[2402.607,9740.151,0], [0,0,1], 100, "" ] exec "smoke.sqs"

General Drop Command:
These scripts, as u can see, use the drop command, which works like:
Code: [Select]
drop [ShapeName, AnimationName, Type, TimerPeriod, LifeTime, Position, MoveVelocity, RotationVelocity, Weight, Volume, Rubbing, Size, Color, AnimationPhase, RandomDirectionPeriod, RandomDirectionIntensity, OnTimer, BeforeDestroy, Object]
And now the info about all these 'bits' that you need to enter, straight from the comref.

General 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:
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.

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.


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.


Sorry i didnt have time to do any kind of example or explain it better, but i hope its moderately useful...



« Last Edit: 29 Oct 2002, 02:21:12 by MaZ »

MaZ

  • Guest
Re:Burning Vehicles?
« Reply #18 on: 29 Oct 2002, 02:19:05 »
holy crapola, didnt read the second page :D pld Messiah :p