Home   Help Search Login Register  

Author Topic: BAS vehicle fire script  (Read 1084 times)

0 Members and 3 Guests are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
BAS vehicle fire script
« on: 31 May 2003, 15:50:43 »
now... i know how to make fires... thats fine... but what i would like is a script like the BAS vehicle fire that has small explosions and also damages you if you come too close... i don't know how to un-pbo the addon tpo get the script etc... so was wondering if any1 had something similiar i could use?

cheers,
Proud Member of the Volunteer Commando Battalion

Iwesshome

  • Guest
Re:BAS vehicle fire script
« Reply #1 on: 31 May 2003, 17:49:18 »
This is what I found when I unpbo'd it.... I wish I new hoe to scipt this good.

Code: [Select]
; BAS - Generic fire/damage script - by  TJ march 2003

;execute with name of object to burn
; eg,  [<objectname>] exec "fire.sqs"

;burn time (in seconds)
_lifeTime = 150
_object = _this select 0
_soundloop = 0
_delay = 0.23
_lifeTicks = _lifeTime / _delay
_lifeTick = _lifeTicks
_ouch = 0
_count = 0

@ (getdammage  _object )>=0.9 && (getpos driver _object select 2)<4

? !( local _object):goto "sound"

_posx = [getpos _object select 0, getpos _object select 1,1.5]

#debris

~0.2
 _bang = "mortarshell" createvehicle  _posx

?! (local _object):goto "sound"

_glow = "GlowFire" createvehicle [0,0,0]
_glow setpos [getpos _object select 0, getpos _object select 1,1.5]
_glow inflame true

#sound

_soundloop = 0

#Begin
;random explos
? ! (local _object):goto "client"

_x = random 50
?_x <=1 && _lifeTick > 550:_bang = "mortarshell" createvehicle getpos _object
?_x>=49 && _lifeTick >460:_bang = "BulletFullAutoG" createvehicle getpos _object

#client

;burn player
? player distance _object <10: player setdammage ((getdammage player) +0.02),goto "scream"

#fire
drop ["cl_fire", "", "Billboard", 1, 1, [random 1,random 1,0.2], [random 0.3, random 0.3, 3], 1, 0.004, 0.004, 0.1, [1,(1 + random 7),1], [[1,0.5,0.5,0], [0.2,0.2,0,0.7], [1,1,0,0.5], [1,1,0.1,0]], [0,1], 0.5, 0.05, "", "",_object ]

drop ["cl_fire", "", "Billboard", 1, 0.7, [- random 1,- random 1,0.35], [random 0.3, random 0.3, 3], 1, 0.004, 0.004, 0, [1,3,0], [[1,0.5,0.5,0], [1,1,0.8,0.7], [1,1,0,0.4], [1,1,0,0]], [0,1], 0.5, 0.05, "", "",_object ]

;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]

;smoke
;drop ["cl_basic", "", "Billboard", 1, 15,[0,-7,1], [ 0, 0,random 0.8], 1, 1.245, 1, 0.15, [random 5,15], [[random 0.1,random 0.15, random 0.1,0.7], [random 0.1,random 0.15,random 0.1,0.7], [random 0.1, random 0.15, random 0.1,random 0.7], [random 0.1, random 0.1, random 0.1,0]], [0,1], 8.5, 1, "", "", _object]


~_delay

_lifeTick = _lifeTick - 1
_soundloop = _soundloop +1
? _soundloop ==4: _glow say "fire1";goto "sound"

_glow setpos [getpos _object select 0, getpos _object select 1,1.5]

?_lifeTick > 0 : goto "Begin"

deletevehicle _glow
~1
drop ["cl_fire", "", "Billboard", 1, 5, [0,0,0.6], [random 0.3, random 0.3, 3], 1, 0.014, 0.004, 0, [1,3,0], [[1,0.5,0.5,0], [1,0.8,0.8,1], [1,0.8,0.8,0.6], [1,1,0.1,0]], [0,1], 0.5, 0.05, "", "",_object ]
exit

#scream
? _ouch == 1:goto "fire"
_ouch = _ouch +1
player say "eng31"
player groupchat "MEDIC! I'm getting burnt here!"
goto "Begin"

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:BAS vehicle fire script
« Reply #2 on: 31 May 2003, 22:53:10 »
do u have the sound as well?
Proud Member of the Volunteer Commando Battalion

Ace

  • Guest
Re:BAS vehicle fire script
« Reply #3 on: 01 Jun 2003, 14:24:24 »
http://www.ofpec.com/yabbse/attachments/Fire_Example.zip

this is an easy one that kills a unit if it comes very close and wounds one if quite close.

I adapted it ages ago in this thread http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=7532

This one is very simple and quick (Well, as simple as drop gets). But its up to you messiah if you want to use it

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:BAS vehicle fire script
« Reply #4 on: 01 Jun 2003, 18:48:33 »
cheers u 2.... i'll try them both out and see what works best... i need it to basically simulate an incendiary device placed by a delta (player) too fry a downed chopper so to remove evidence of country and technology....

thanx again.

:thumbsup:
Proud Member of the Volunteer Commando Battalion