Messiah 2 Posted November 13, 2005 Made a flare gun of sorts, and it all fires ok etc - but the flare itseld doesnt light up <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgAmmo { class Default{}; class BulletSingle:Default {}; class BulletSingleW: BulletSingle{}; class Grenade: Default{}; class ukf_White_Flare : Grenade { hit=10;indirectHit=6;indirectHitRange=3.0; cost=100; simulation=shotIlluminating; simulationStep=0.050; explosive = False; soundHit[]={,0,1}; lightColor[] = {1, 1, 1, 0}; }; class ukf_Red_Flare : ukf_White_Flare { lightColor[] = {1, 0, 0, 0}; }; }; class CfgWeapons { class Default {}; class MGun: Default {}; class Riffle: MGun {}; class M16:Riffle{}; class HandGunBase: Riffle {}; class ukf_paraflareR : Handgunbase { access=2; scopeWeapon=2; scopeMagazine=2; aiRateOfFire=0.500000; aiRateOfFireDistance=50 model="\ukf_ukweps\flare\ukf_flare"; modelOptics=""; picture="\ukf_ukweps\flare\flareRicon.pac"; displayName="Para Flare (Red)"; displayNameMagazine="Flare"; shortNameMagazine="Flare"; count=1; weaponType=2; magazineType=32; magazineReloadTime=3; autoReload=0; soundContinuous=0; sound[]={}; drySound[]={}; reloadMagazineSound[]={}; magazines[] = {ukf_red_flare}; backgroundReload=0; autoFire=0 dispersion=0.002000; multiplier=1; burst=1; reloadTime=5; }; class ukf_paraflareW : ukf_paraflareR { model="\ukf_ukweps\flare\ukf_flareW"; displayName="Para Flare (White)"; magazines[] = {ukf_white_flare}; picture="\ukf_ukweps\flare\flareWicon.pac"; }; class ukf_White_Flare: ukf_paraflareW { scopeWeapon=0; scopeMagazine=2; displayNameMagazine= "Para Flare (White)"; picture="\ukf_ukweps\flare\flareWAicon.pac"; initSpeed=80; }; class ukf_Red_Flare: ukf_paraflareR { scopeWeapon=0; scopeMagazine=2; displayNameMagazine= "Para Flare (Red)"; picture="\ukf_ukweps\flare\flareRAicon.pac"; initSpeed=80; }; #rest of config it's part of a much larger config, but those are the relevant parts... can anyone think what i'm doing wrong? Share this post Link to post Share on other sites
5133p39 16 Posted November 13, 2005 You are throwing the flare, right? There are two conditions which MUST be met: 1. you must throw the flare really high - try aim as high as you can. Because the Flare will ignite after some time, so maybe it hits the ground before it can light itself. 2. what time have you set in your mission? The flare wont be visible in "daylight". I am not sure about exact time, but try it in 20:00 and you should be safe. Also, be aware, that as soon as your flare hits the ground, it will wanish. If you are after throwable flares, which will stay on ground, made some just a few days ago Here are the flares, do what you want with them, use them change them, or throw them away. If you want to really use them in some UKF addon packs, i will be glad they will be put into some more use there. And if you want, you can mention somewhere in the readme, that "22. Regiment" clan helped you with little something, but that's not a demand ;-) Just use the flares: my weapons addon with flares (15Kb) a sample mission, with needed script ...and YES - it need a script to be used, and YES - it works in MP, and YES - the script is clever and small, and NO - it doesn't LAG at all. Share this post Link to post Share on other sites
Messiah 2 Posted November 14, 2005 i think you're missing the point... it's not a case of my inability to fire a flare into the air, it's a case of the damn thing not lighting up and casting light on the battlefield. and yes, i had gotten as far as realising flares only work at night what i was asking for was someone to check over the posted config to check for something i've written wrong, and hence causing the flare not to work. Share this post Link to post Share on other sites
5133p39 16 Posted November 15, 2005 ok, i must admit i haven't read the config, i just seen something about Grenade so i thought you are making a THROWABLE flare, so i pointed out the problems i once bumped into. I am not sure why it doesn't work for you, but i am sure you need to define the AMMO used for the magazine - otherwise the engine doesn't know WHAT should be fired from the weapon - you need to add the "ammo" parameter to your magazine definition. So in your case, you should probably add in to the ukf_Red_Flare class in cfgWeapons, and set it's value to "ukf_White_Flare". So, add the following line to the class ukf_Red_Flare: ammo="ukf_White_Flare"; ...that's probably the case why it didn't worked. Share this post Link to post Share on other sites
Messiah 2 Posted November 15, 2005 funky... shall try that - i had copied a config for a flare gun to make sure it worked... obviously i omitted something Share this post Link to post Share on other sites
wheres my rabbit ? 10 Posted November 15, 2005 sry for OT messiah but i got some use out of his little flare addon added a bit smoke in ..great for nightime extractions <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_u = _this select 0; _w = _this select 1; _m = _this select 2; _r = _this select 4 _flare = NearestObject[_u, _r] _fp = getPos _flare ? _r == "MORS_FlareG": _l = "MORS_Light" ? _r == "MORS_FlareGR": _l = "MORS_LightR" ? _r == "MORS_FlareGG": _l = "MORS_LightG" ? _r == "MORS_FlareGY": _l = "MORS_LightY" ;// LOOP WHILE B EXIST #Lup ~.05 ? not (isNull _flare) : _fp = getPos _flare; goto "Lup" _fp Set [2,0.1] _flare = _l CreateVehicle _fp _tout = _time + 40 #wt drop ["cl_basic","","Billboard",0.01,10,[0,0,0],[0,0,0],0,1.26,1,1,[2.3,12],[[1,1,1,1],[1,1,1,1],[1,1,1,0.5],[1,1,1,0.1]],[0,1,0,1],0.2,0.4,"","", _flare]; ~0.6 ? inflamed _flare and _time < _tout : goto "wt" DeleteVehicle _flare exit Share this post Link to post Share on other sites
5133p39 16 Posted November 15, 2005 looks good, really, the smoke was missing there :-) ..but i would suggest a little less smoke, i think it's too thick and big for a burning flare Share this post Link to post Share on other sites
Messiah 2 Posted November 15, 2005 yeah, a little less - but an amazing effect none the less Share this post Link to post Share on other sites
5133p39 16 Posted November 16, 2005 sry for OT messiahbut i got some use out of his little flare addon added a bit smoke in ..great for nightime extractions ...and more importantly: you don't need to SCRIPT the smoke by the DROP command the "flare" object which is spawned on the ground is actually a fireplace without the 3D model (simulation="fire") with the smoke removed. I will alter the smoke definition to suit my taste, and release this new version (or you can do it yourself if you wish) Share this post Link to post Share on other sites
wheres my rabbit ? 10 Posted November 16, 2005 oh rgr presume thats done in the cfg then ? if you could post the code or pm me that would be appreciated. btw messiah did you sort you problem ? cos this is kind of getting way off the original subject now..i dont want to hijack your thread if your still having trouble btw..hope to see you both soon on the battlefield at the joint ops weekend Share this post Link to post Share on other sites
Messiah 2 Posted November 16, 2005 havnt actually tried it yet - had a very busy week away from flashy - should be able to get some time thursday Share this post Link to post Share on other sites