Jump to content

cornhelium

Member
  • Content Count

    656
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About cornhelium

  • Rank
    Master Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Looking spoogetastic, guys :)
  2. cornhelium

    EECP - Enhanced ECP

    All the best K-Man. Your input on JAM3's recoils was much appreciated. Â Cheers mate, CH
  3. cornhelium

    [CAMP] Aurora of Tonal

    Thanks bardosy for this. Like J W I have 0 time for OFP nowadays, but at some point I'll definitely be trying this with and without Ebud's Tonal update. Cheers, CH
  4. Hi krypling, AgentFox2 made the most recent version of that script, which was a casualty of the great OFPEC crash. If you PM him directly he might be able to send you a copy - he's a rather helpful fellow y'know Cheers, CH
  5. cornhelium

    Tonal Update

    Doh, that'll teach me to jump the gun As Matt says, perhaps someone can release an ECP OPFOR after release. If the current OPFOR pbo structure is kept (ie. a tiny separate pbo for the .cpp), users could download and apply this in a few seconds. Cheers, CH
  6. cornhelium

    Tonal Update

    Hi Ebud, Sent you an ECP config.cpp for the v1.1 OPFOR - check your PM mate. Cheers, CH
  7. cornhelium

    Tonal Update

    Sorry to be a pest Ebud, but I just remembered that the current Tonal units aren't fully ECP compliant. Do you plan to fix this for the release? Here's a personal edit I've done on the Toyota wars units which works perfectly (needs 1 BIS unit on the map). Should be a snap to adapt to the Tonalis and paste into the base classes over the current JAM EHs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class EventHandlers : ECP_EventHandlers { init = "if (format[{%1},ECP_path]=={scalar bool array string 0xfcffffef})then{ _0={ECP_INIT}createVehicle [0,0,0]}; if (format[{%1},count ECP_addUnitsArray] == {scalar}) then {ECP_addUnitsArray=[]}; ECP_addUnitsArray=ECP_addUnitsArray+[_this select 0]; _this call (ECP_resources select 40); _this exec ""\DMA_CHAD\scr\african_faces.sqs"""; fired = "_this call (ECP_resources select 41); if((_this select 1 in[{Throw},{JAM_AT4Launcher},{JAM_CAVS_AT4Launcher},{JAM_RPG7Launcher},{JAM_CAVS_RPG7Launc her},{JAM_M72LAWLauncher},{JAM_CAVS_M72LAWLauncher}])or(_this select 4 in[{JAM_MarkerGrenadeammo}]))then{_this exec{\JAM_Magazines\FX\firedEH.sqs}}"; }; Not forgetting <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class ECP_EventHandlers {}; just above the class CfgVehicles section. With this you get the full ECP gunsmoke, blood, bulletwhiz, DSAI etc, and also your own face set EH at initialisation. Cheers  CH
  8. cornhelium

    Sounds - bullets

    I found something funny about the bullet fly noise while working on the different JAM3 bullet sounds: OFP plays it back at a different pitch according to the speed of the bullet. Slower bullet = higher pitch, faster bullet = lower pitch. For mags with initspeed around 8-900 (ie most assault & sniper rifles and machineguns), OFP plays back the sound quite a bit slower, whereas for 250-400 (SMGs, pistols, subsonic) the sound is played back at more than double speed  Also, only one fly sound per bullet type can be played - you can't have a selection of fly sounds like you can with hit sounds. Cheers, CH
  9. Ah, think I've found the cause of my syntax errors... ...If I'm stuffing variables into a global array, guess I better define an empty array to start with : vd = [] This now seems to work: fauna_init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> SilencedBullets = ["StrokeFistHit","StrokeGunHit","BulletSilencedSingle",etc] Explosives = ["GrenadeHand","PipeBomb","TimeBomb",etc] Smokeshells = ["JAM_SmokeGrenadeRed",etc] SilentShots = SilencedBullets + Explosives + Smokeshells vd = [] ~1 vd set [1, true ] ~5 vd set [3, (list va1m) ] ;loop etc va1m activation field (split for the sake of readability) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> vd set [2, (+thislist)]; vd set [0, true ]; player globalChat "activated va1m"; {if (vd select 1) then {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; vd set [0, false ]; player globalchat "va1m  original fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m original bomb"}}}]}} foreach thislist; {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; vd set [0, false]; player globalchat "va1m addition fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m addition bomb"}}}]} foreach ((vd select 2) - (vd select 3)) va1m deactivation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> vd set [4, ((vd select 2) - (vd select 3))]; vd set [3, ((vd select 3) + (vd select 4))]; vd set [1, false]; player globalChat "deactivated va1m" ...as far as the savegame bug is concerned, shouldn't this save 5 global variables per soundcentre?  Cheers, CH
  10. Hi, Still working on my wildlife sounds system for Tonal. The goal is to have mission editor templates for each separate area of Tonal that mission makers can simply merge over their finished mission, giving them reactive, authentic SE African wildlife sounds that change around the clock. So far, everything's going great. The basics are in place and working, now got a few months of editing and placing all the sounds. However, I've been reading about the savegame bug, and I might have a basic flaw in that I'm using a >lot< of global variables (could eventually run to a few hundred if other lag issues allow). All of these globals are needed, as many different groups of 2 trigger + 1 logic are passed to the same fauna.sqs at different times. Now, I've read here that the ECP team got around the savegame bug by stuffing all of their globals into a few arrays, then referencing them with selection numbers. Taking this approach, I could put half of my globals and array names into one array per area, probably buying myself enough headroom to get the system working safely at a decent scale. I've just tried a little re-write and have hit a wall of error messages. Could someone advise the correct syntax please? Here's what works, using the full global variable set for one 2trig+1logic "soundcentre". First, the elements and their names: Globvars passed to fauna.sqs va1m main trigger. covers a 250m radius. emits wildlife sounds. adds firedEH to units that can exec another "fly away in panic and don't come back for 10 minutes" script. zapped to 0,0,0 for 1 second in every 31 so that list va1m can refresh. va1t inner trigger. covers a 50m radius. used by fauna.sqs to determine if units are too near, in which case the main trigger will emit warning calls or go silent. Also emits the "panic" sounds as va1m is zapped to 0,0,0 for 10 minutes. Also the only element that never moves - this acts as an anchor point within the fauna.sqs which uses local variables exclusively. va1l logic. used by a looping script that checks the player's distance from all such logics. When player is within 500m, the script passes these three globals to fauna.sqs (along with a "type" that determines which section of fauna.sqs is used). We only want fauna.sqs to be executed once by any one group, so it now moves this logic 10km away for the duration. I think of each of these 2 trigger + 1 logic groups as a "soundcentre" Globvars referenced by va1m activation/deactivation fields to manage the firedEH va1 condition to activate/deactivate the firedEH. When a unit fires, the wildlife should flee in panic only once. Thus the firedEH itself sets va1 to false the first time a unit fires. This disables the EH until va1m is returned after 10 minutes or so, when it is reset to true by the activation field. va1i condition to isolate the units in list va1m at mission start. part of the archiving system described below. set to true in fauna_init.sqs, sets permanently to false first time va1m deactivates. Globarrays referenced by va1m activation/deactivation fields to manage the firedEH va1r copy of va1m list. refreshed on each activation (ie every 31 seconds) va1a growing archive of va1m list. set in fauna_init.sqs as list va1m, then added to with each trigger deactivation va1n new units in the area. va1m list from current activation minus va1m archive from previous deactivation. SilencedBullets set in fauna_init.sqs. small array of bullet classnames that should not make wildlife flee. easily accessible to mission makers to add/remove bullet types as they wish Explosives also set in fauna_init.sqs. another small array of explosives that will trigger a delayed flyoff script when "fired". Smokeshells another small array of smokeshells, flares etc that should not cause wildlife to flee at all. SilentShots SilencedBullets + Explosives + Smokeshells. OK - here's the current syntax which works fine: Globvars set in fauna_init.sqs (executed via init.sqs): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> SilencedBullets = ["StrokeFistHit","StrokeGunHit","BulletSilencedSingle",etc] Explosives = ["GrenadeHand","PipeBomb","TimeBomb",etc] Smokeshells = ["JAM_SmokeGrenadeRed","JAM_SmokeGrenadeGreen",etc] SilentShots = SilencedBullets + Explosives + Smokeshells ~1 va1i = true ;similar lines here for other trigger groups making different sounds vb1i, vc1i, va2i etc. currently using 6 groups OK ~5 va1a = list va1m ;starts archive by waiting until va1m has activated then capturing its list before it deactivates for the first time ;similar lines here for other trigger groups making different sounds vb1a, vc1a, va2a etc. currently using 6 groups OK #loop ;script now runs in 60 second loops checking player distance to the logics and passing the elements to fauna.sqs when <500m goto "loop" va1m activation field (split to make a little clearer - basically the first section is only used once, after that only the second section is used <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> va1r = +thislist; va1 = true; player globalChat "activated va1m"; {if (va1i) then {_x addEventHandler ["fired",{if (va1 && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; va1 = false; player globalchat "va1 original fired"}}; if (va1 && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1 original bomb"}}}]}} foreach thislist; {_x addEventHandler ["fired",{if (va1 && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; va1 = false; player globalchat "va1 addition fired"}}; if (va1 && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1 addition bomb"}}}]} foreach (va1r - va1a) va1m deactivation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> va1n = va1r - va1a; va1a = va1a + va1n; va1i = false; player globalChat "deactivated va1m" All the above works fine, and so far is working with 6 soundcentres (each one using different global names vb1m,vbl,vb1t, vb1i, vb1a etc). Now, here's my extremely noob attempt to put some of these globvars into a single array Method put the globvars va1 and va1i, and the global arrays va1r, va1r, va1n, into a single array "vd" (short for "Veld area") va1 becomes (vd select 0) va1i becomes (vd select 1) va1r becomes (vd select 2) va1a becomes (vd select 3) va1n becomes (vd select 4) the globvars and arrays for subsequent veld soundcentres will just follow on sequentially ie vb1 becomes (vd select 5), vb1i becomes (vd select 6) etc. the global names for the triggers & logics will remain as they are New syntax fauna_init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ~1 (vd select 1) = true ~5 (vd select 3) = list va1m ;etc. loop unchanged as trigger & logic names remain the same va1m activation field (not working - editor won't accept syntax) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (vd select 2) = +thislist; (vd select 0) = true; player globalChat "activated va1m etc"; {if ((vd select 1)) then {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; (vd select 0) = false; player globalchat "va1m etc original fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m etc original bomb"}}}]}} foreach thislist; {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; (vd select 0) = false; player globalchat "va1m etc addition fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m etc addition bomb"}}}]} foreach ((vd select 2) - (vd select 3)) va1m deactivation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (vd select 4) = (vd select 2) - (vd select 3); (vd select 3) = (vd select 3) + (vd select 4); (vd select 1) = false; player globalChat "deactivated va1" also tried this, after having a quick look at some ECP scripts: fauna_init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ~1 vd set [1, true] ~5 vd set [3, (list va1m)] ;etc. loop unchanged as trigger & logic names remain the same va1m activation field (not working - long error message on trigger activation looks like something to do with one of the {_x addEH...} sections) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> vd set [2, (+thislist)]; vd set [0, true]; player globalChat "activated va1m"; {if ((vd select 1)) then {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; vd set [0, false]; player globalchat "va1m etc original fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m etc original bomb"}}}]}} foreach thislist; {_x addEventHandler ["fired",{if ((vd select 0) && (_this select 0) distance va1m < 500) then {if !((_this select 4) in SilentShots) then {[_this select 0,va1m, va1l, va1t,"va"] exec "flyoff.sqs"; vd set [0, false]; player globalchat "va1m etc addition fired"}}; if ((vd select 0) && (_this select 0) distance va1m < 500) then {if ((_this select 4) in Explosives) then {[_this select 0,_this select 4,va1m, va1l, va1t,"va"] exec "flyoffdelayed.sqs"; player globalchat "va1m etc addition bomb"}}}]} foreach ((vd select 2) - (vd select 3)) va1m deactivation field <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> vd set [4, (vd select 2) + (vd select 3)]; vd set [3, (vd select 3) + (vd select 4)]; vd set [1, false]; player globalChat "deactivated va1m" Anyone who can advise me of the right syntax will be the proud owner of a wookie life-debt Thanks for your time, CH
  11. cornhelium

    Tonal Update

    Amazing work Ebud. Tonal captured my imagination when it was released back in 2003, and I've been "in-country" ever since. Those new Gov. Scouts could come in handy - I'm planning a nice little ambush involving a swamp, a BTR-T and a snorkel. Tell 'em I'll be waiting at bd24 with a sitrep and a nice cup of nettle tea Edit: nevermind, I see you've got enough on your plate Cheers, CH
  12. cornhelium

    SJB Weapons Pack Released

    Beautiful.
  13. cornhelium

    Combined Arms Engine

    Sounds very impressive as usual tacrod. I'll be giving this a go as soon as time allows. Cheers, CH
  14. cornhelium

    Fired EH ammotypes in sqf?

    Thanks guys. Just to clarify what I'm looking for: This snippet works perfectly, but I want to include about 100 bullet types rather than just the 3: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {if (tna1 && (_this select 0) distance tna1m < 500 && ((_this select 4) in ["JAM_West_762x51_Single_Bullet","JAM_West_762x51_Burst_Bullet","JAM_West_762x51_Auto_Bullet"])) then {[(_this select 0),tna1m, tna1l, tna1t,"tnaf"] exec "flyoff.sqs"; So, I'm looking for something like this, except I'm not sure of the right syntax <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {if (tna1 && (_this select 0) distance tna1m < 500 && ((_this select 4) in BulletArray.sqf)) then {[(_this select 0),tna1m, tna1l, tna1t,"tnaf"] exec "flyoff.sqs"; I'll have a few dozen of these triggers around, and I want a couple of global ammo arrays they can all refer to. I'd like to have these arrays in an .sqf or .sqs file so that missionmakers can easily add ammotypes (I plan to put the core scripts and sound files in a .pbo) I'm using the actual bullet/bomb classes, not the base classes. The trigger initfields need to pass global variables to a central fauna.sqs, so if I assigned the EH in an .sqf I'd need one for each trigger. Thus better in this case to assign the EH within the trigger itself. Maybe I can just run a separate ammotypes.sqs at mission start, to define the two global arrays? Eg. in init.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [] exec "ammotypes.sqs" ammotypes.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> BulletArray = ["JAM_West_762x51_Single_Bullet","JAM_West_762x51_Burst_Bullet","JAM_West_762x51_Auto_Bullet","LSR_M4_Bullet",etc",etc"...] ExplosiveArray = ["GrenadeHand","PipeBomb","TimeBomb","COCM18A1","etc","etc","etc"...] exit D'you think this would work? Is this an efficient way of doing it? What would be the correct syntax to refer to the array? I'm away from home at the moment and can't try this out. Many thanks CH Ps Yeah, they refer to triggers and logics in the group. It's basically so that one large central fauna.sqs can be used by the many 2trigger&logic groups (<40 of them I hope). Really, it's working fine and is robust, I just need to get over this last wrinkle then I can "load test" it Just this event. It's set to false by the firedEH, so that a shot can only make the birdies fly away >once< ...then a few minutes later "they" (ie the trigger) will return from [0,0,0] and will start singing again. The trigger resets to true if anybody is present. There's also code to make sure each unit can only get the trigger's EH added >once<, though it never gets removed (beyond my ability and available time).
  15. Hi, I'm working on a wildlife sounds system, and the last hurdle is getting singing birds etc to "fly away" in alarm when a loud shot or explosion occurs. Here's part of the init field of the trigger for one area: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> tna1 = true; player globalChat "activated tna1"; {if (tna1i) then {_x addEventHandler ["fired",{if (tna1 && (_this select 0) distance tna1m < 500 && ((_this select 4) in ["JAM_West_762x51_Single_Bullet","JAM_West_762x51_Burst_Bullet","JAM_West_762x51_Auto_Bullet"])) then {[(_this select 0),tna1m, tna1l, tna1t,"tnaf"] exec "flyoff.sqs"; tna1 = false; player globalchat "tna1 original fired"}; if (tna1 && (_this select 0) distance tna1m < 500 && ((_this select 4) in ["GrenadeHand","PipeBomb","TimeBomb"])) then {[(_this select 4),tna1m, tna1l, tna1t,"tnaf"] exec "flyoffdelayed.sqs"; player globalchat "tna1 original bomb"}}]}} foreach thislist flyoff.sqs causes the wildlife to flee immediately, away from the firing unit flyoffdelayed.sqs will wait for the ammo to explode, then the wildlife will flee from the explosion It's all working great, but I really want to expand the types of ammo that will cause flyoff.sqs or flyoffdelayed.sqs to execute. I'd like to just list the ammotypes in 2 sqf files, "flyoffbullets.sqf" and "flyoffexplosives.sqs". This would also allow mission editors to easily add/remove ammo from the sqf files, rather than trawling through several dozen triggers. Can anyone advise me of the correct syntax to take the ammo classnames out of the trigger initfield and into the sqf files please? Thanks, CH
×