riffleman 20 Posted February 10, 2010 There are many damage script i see in missions,campaign and mods.but i like snakeman pmc campaign damage script.in which everything become crap .i know there are many script of damage.is it possible that i make a script for my missions of ofp. Share this post Link to post Share on other sites
riffleman 20 Posted March 10, 2010 I want to make a damage script,any help. Share this post Link to post Share on other sites
rellikki 7 Posted March 10, 2010 What is "damage script"? Share this post Link to post Share on other sites
riffleman 20 Posted March 10, 2010 i mean when tank or vechicle get hitted with rocket launcher,than they get damage/burn.i want to make that one Share this post Link to post Share on other sites
celery 8 Posted March 10, 2010 Look at a command reference and see how eventhandlers and setDamage work. Share this post Link to post Share on other sites
riffleman 20 Posted March 10, 2010 For example a script-it can help me. Share this post Link to post Share on other sites
zulu1 145 Posted March 11, 2010 (edited) Ok Riffleman try this. Copy text in box and save it as a file called "fire.sqs" ; BAS - Generic fire/damage script - by TJ march 2003;execute with name of object to burn ; eg, [objectname] exec "fx\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 = "bas_islefire" 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 "fire";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" Then put the file in your mission folder and in the editor put a bmp, tank, etc.. and in the initialization field put this line : this exec "fire.sqs" . Then blow it up and watch the fire. There are others with more explosion effects, but try this to see how it works. **edit: Approach the vehicle while it's burning and see what happens... :) Edited March 11, 2010 by Zulu1 Share this post Link to post Share on other sites
riffleman 20 Posted March 13, 2010 Ok Riffleman try this. Copy text in box and save it as a file called "fire.sqs"Quote: ; BAS - Generic fire/damage script - by TJ march 2003 ;execute with name of object to burn ; eg, [objectname] exec "fx\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 = "bas_islefire" 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 "fire";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" Then put the file in your mission folder and in the editor put a bmp, tank, etc.. and in the initialization field put this line : this exec "fire.sqs" . Then blow it up and watch the fire. There are others with more explosion effects, but try this to see how it works. **edit: Approach the vehicle while it's burning and see what happen i try it at last and showing error Share this post Link to post Share on other sites
zulu1 145 Posted March 13, 2010 Sorry simple scripting error. The line should be: [This] exec "fire.sqs" insted of: this exec "fire.sqs" :o Share this post Link to post Share on other sites
riffleman 20 Posted March 13, 2010 work man,but get killed surprised me very much,i know that there are many,so if anyone can give example here and than all can use them Share this post Link to post Share on other sites