Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
USMC Sniper

Is it possible to

Recommended Posts

Say I wanted a napalm dropping plane. So I would make the script, put it into a pbo with my addon, and in the cpp designate that whenever the bombs were dropped, they would cause a napalm effect when they detonated.

Share this post


Link to post
Share on other sites

You could do something like that with using the "fired" event from the config I guess...

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Oct. 26 2002,23:31)</td></tr><tr><td id="QUOTE">You could do something like that with using the "fired" event from the config I guess...<span id='postcolor'>

Could you show us how you would do this ?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (quakergamer @ Oct. 27 2002,00:34)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Oct. 26 2002,23:31)</td></tr><tr><td id="QUOTE">You could do something like that with using the "fired" event from the config I guess...<span id='postcolor'>

Could you show us how you would do this ?<span id='postcolor'>

Well im not going to do a napalm script just to show how to do it wink.gif

But here's how I did a BMP with a smoke generator, something a bit similar...

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgAmmo {

class default {}

class Shell: default {}

class KEGSmokeGeneratorAmmo: Shell {

model="shell";

simulation="shotBullet";

simulationStep=0.050000;

cost=0;

soundHit[]={"",0.0,1};

soundFly[]={"",0.0,1};

indirectHitRange=0;

minRange=0;

minRangeProbab=0.000000;

midRange=00;

midRangeProbab=0.00000;

maxRange=00;

maxRangeProbab=0.000000;

visibleFire=0;

audibleFire=0;

visibleFireTime=0;

explosive=0;

}

}

class CfgWeapons {

class default {}

class Shell73: default {}

class KEGSmokeGenerator: Shell73 {

scopeWeapon=0;

scopeMagazine=2;

displayName="Smoke Generator";

displayNameMagazine="Smoke Generator";

shortNameMagazine="SGS";

nameSound="";

ammo="KEGSmokeGeneratorAmmo";

count=250;

initSpeed=0;

reloadTime=0.400000;

burst=3;

AutoFire=1;

sound[]={"\keglynx\lynx.ogg",10.0,1};

reloadSound[]={"",0.0,1};

ffCount=1;

}

}

class CfgVehicles {

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class LandVehicle: Land {};

class Tank: LandVehicle {};

class APC: Tank {};

class BMP: APC {};

class KEGsavuBMP: BMP

{

displayName="BMP (Savuava)";

weapons[]={Gun73,MachineGun7_6,AT3Launcher,KEGSmokeGenerator};

magazines[]={Heat73,Shell73,MachineGun7_6,AT3Launcher,KEGSmokeGenerator};

class EventHandlers

{

fired = "if ((_this select 4) == ""KEGSmokeGeneratorAmmo"") then {drop [""cl_basic"", """", ""Billboard"", 1, 70, [getpos (_this select 0) select 0,getpos (_this select 0) select 1,(getpos (_this select 0) select 2)+1.5], [(sin getdir (_this select 0)) * ((speed (_this select 0))/5),(cos getdir (_this select 0)) * ((speed (_this select 0))/5),0], 1, 0.00510, 0.004, 0.1, [1.06+random 2,140-random 60], [[1,1,1,1], [0.7,0.7,0.7,1], [0.6,0.6,0.6,0.7], [0.5,0.5,0.5,0]], [0,1,0,1,0,1], 0.0, 0.0, """", """", _object];}";

};

};

};

<span id='postcolor'>

Basically how it works, is that there is a dummy weapon named "KEGSmokeGenerator" in the BMP, which doesnt actualyl fire anything. Instead, the "fired" event has the if, which checks which weapon was fired, and if it was the smoke generator, it executes the "drop" command which generates a puff of smoke.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×