Messiah 2 Posted August 15, 2008 I've read the six tracers thread, searched the forum, and sent sickboy a PM, but still I'm having trouble. Its bound to be something obvious, but hell, its eluding me. I've got a patrol vehicle, two turrets. With a standard config six tracers only work if I place an empty vehicle and get in and fire the weapons. If I place a manned one, the tracers do not work, and if you get out the vehicle, the tracers on your rifle stops working too. BIS stock vehicles all work when placed as manned, so I'm doing something wrong. The patrol vehicle uses the BIS M2 as its main weapon, and then a custom GPMG weapon at the front. I'd have predicted that maybe my custom weapon may not have worked, but even the BIS stock m2 weapon doesnt work either. I tried adding XEH, but either thats 1. Not the solution or 2. I'm not adding the compatability correctly, because that didn't solve my problem. I added the following in the config: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Eventhandlers {}; as a free floating base class and then: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class eventhandlers : Extended_Eventhandlers { ... I get no errors, and my eventhandlers work, so I assume its been added ok? Has anyone had any experience with getting tracers to work on their vehicles? Share this post Link to post Share on other sites
.kju 3245 Posted August 15, 2008 You may have to add custom SIX config values to your config. Send zGuba a PM. He does tracer stuff a lot. Share this post Link to post Share on other sites
Messiah 2 Posted August 15, 2008 Thanks Q, I've sent him an PM. Share this post Link to post Share on other sites
canukausiuka 1 Posted August 15, 2008 Do the tracers work for the primary weapon, or for neither? I know the script behaves differently when it cannot use the "ammo" command to find the number of bullets remaining. Also, to get independently counted tracers, I had to set up a different weapon for each turret. Share this post Link to post Share on other sites
Messiah 2 Posted August 15, 2008 It works if I place an empty vehicle and then get in. In this case it will work for both of the vehicle weapons. If I place a manned one where I'm gunner, driver, whatever, the tracers cease to work on both vehicle weapons, and also my personal weapon if I get out. Each turret has a different weapon. Share this post Link to post Share on other sites
canukausiuka 1 Posted August 16, 2008 It sounds like your vehicle is not running the XEH init. Are you using an old version of the script? I remember at one point, I had to insert an M2 machinegun to get my units tracers to work b/c of the init, but that was a long time ago. Share this post Link to post Share on other sites
Messiah 2 Posted August 16, 2008 well, like I said, I'm wasn't sure if Id set up XEH properly. I've posted the various parts on my first post. So to get XEH to work, I need to add that XEH init? I do believe I tried, but it came up with an error, so I removed it. Share this post Link to post Share on other sites
killswitch 19 Posted August 17, 2008 Hello Messiah! In order to make an addon XEH compatible you <ul>1 Add "Extended_EventHandlers" to the addon's requiredAddons list. 2 Don't put any class EventHandlers anywhere. 3 Define one or more Extended_<event type>_EventHandlers classes and put your custom event handlers in there instead. Something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class TAG_MyAddon { units[]={ ... list of vehicle classes ... }; weapons[]={... list of weapons classes ... }; requiredVersion=1.08; // XEH needs 1.08 requiredAddons[]={"Extended_EventHandlers"}; }; }; class Extended_Init_EventHandlers { class TAG_VehicleA { TAG_VehicleA_init="init EH for TAG_VehicleA"; }; class TAG_VehicleB { TAG_VehicleB_init="different init EH for the B vehicle"; }; }; class Extended_Fired_EventHandlers { class TAG_MyVehicleA { TAG_MyVehicleA_fired="_this call TAG_fMyFired"; }; }; class Extended_GetIn_EventHandlers { ... etc etc ... }; ... rest of the addon's config goes here ... In particular, do NOT do this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Eventhandlers {}; // No! nor this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers: Extended_EventHandlers { // NO! ... SIX_Tracers compatibility In order for the custom GPMG to have tracers, you'll have to make sure the ammo it uses have a few extra properties. As an example, here's what SIX_Tracers.pbo has in the BIS 7.62x51 ammo class: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class B_762x51_Ball: BulletBase { tracerColor[] = {0, 0, 0, 0}; tracerColorR[] = {0, 0, 0, 0}; SIX_tracerEnable = 1; SIX_tracerColor = "R"; // "G" for green tracers SIX_tracerPer = 3; // One tracer every three rounds SIX_tracerSize = "Medium"; // "Small", "Large" SIX_tracerLife = 1.345; };Hope that helps. Share this post Link to post Share on other sites
Messiah 2 Posted August 17, 2008 Hello killswitch, ever to the rescue it seems when it comes to my configs  Quote[/b] ]1 Add "Extended_EventHandlers" to the addon's requiredAddons list. After 2 years of you reminding us time and time again, yes, its in the required addons list. So essentially instead of using its own eventhandlers, you 'add' your own to the extended ones instead... so where as at the moment I have the following: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers: Extended_EventHandlers    { init = "_this exec ""\ukf_jackal_mwmik\scripts\startup.sqs"""; }; I would now use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Init_EventHandlers {  class ukf_jackal_mwmik  {    ukf_jackal_mwmik_init="_this exec ""\ukf_jackal_mwmik\scripts\startup.sqs""";  }; }; in a free floating position (i.e. not inside any other CFG's). I have three vehicles (soon to be 6), but all inherit from the first vehicle class ukf_jackal_mwmik. Do I have to define each and every one? Such as: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Init_EventHandlers { class ukf_jackal_mwmik { ukf_jackal_mwmik_init="_this exec ""\ukf_jackal_mwmik\scripts\startup.sqs"""; }; class ukf_jackal_mwmik_gpmg : ukf_jackal_mwmik {}; class ukf_jackal_mwmik_gmg : ukf_jackal_mwmik {}; }; Thanks again for the help Share this post Link to post Share on other sites
killswitch 19 Posted August 17, 2008 So essentially instead of using its own eventhandlers, you 'add' your own to the extended ones instead... so where as at the moment I have the following:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers: Extended_EventHandlers { init = "_this exec ""\ukf_jackal_mwmik\scripts\startup.sqs"""; }; I would now use:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Init_EventHandlers { class ukf_jackal_mwmik { ukf_jackal_mwmik_init="_this exec ""\ukf_jackal_mwmik\scripts\startup.sqs"""; }; };in a free floating position (i.e. not inside any other CFG's).Precisely! Quote[/b] ]I have three vehicles (soon to be 6), but all inherit from the first vehicle class ukf_jackal_mwmik. Do I have to define each and every one?No, that's not needed - since the other five are descendants of ukf_jackal_mwmik, they'll pick up the init EH from the base class.That covers the basics of XEH. There are more advanced ways of defining XEH event handlers so that they <ul>[*] are only applied to a specific vehicle type and not descendants thereof. (See the "New in 1.3" section of the XEH readme text file and the "SLX_Advanced_Init_Example" addon) [*] apply to all descendants of a type with a few specific exceptions. (Described in the "New in 1.5" part of the readme) Share this post Link to post Share on other sites
Messiah 2 Posted August 17, 2008 Excellent, thank you very much. I shall go test this now. I forgot to mention that the custom GPMG only uses a custom weapon and magazine, but still uses the BIS standard 7.62 ball ammunition (hence why, at least periodically, I could sometimes see tracers on the GPMG) [edit] works a treat Share this post Link to post Share on other sites