Jump to content

cornhelium

Member
  • Content Count

    656
  • Joined

  • Last visited

  • Medals

Everything posted by cornhelium

  1. Hi there, I'm trying to place a sound on the map that will loop for as long as no human is present within 50m of the sound's source. When a human comes within 50m the sound should stop, only starting after all humans have left the area again. The effect I'm after is that birds and animals in the jungle canopy will fall silent when humans are near - mainly to increase the tension as an enemy patrol approaches your ambush. I'm having 2 problems: 1. How do I get the sound to loop as long as nobody is present? At the moment I'm placing a gamelogic "birds1" to be the sound source and then using this line in triggers: birds1 say "mysound" ...but of course it only plays once. 2. When I try to start the above with just 1 trigger, set to Nobody present, it won't work because the gamelogic "birds1" is right in the middle of the trigger area. I have to use 4 separate triggers - one each for East, West, Guer and Civ not present. But then, the sound triggers 4 times Can I get 1 trigger to activate when no units >except< gamelogics are present? Thanks, CH
  2. cornhelium

    Looping a sourced sound

    Thanks mate, I'll come back to this after my exams, but your answer gives me exactly what I need to move on As you suggest, I've also modified it so that the gamelogics themselves exec the script when the player comes within xxx meters. Cheers, CH
  3. cornhelium

    Looping a sourced sound

    Ah, got it: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop ;list units in trigger area, excluding the sound source gamelogics _list1 = (list nightjar_hunting1_trig) - [nightjar_hunting1_logic] ;check if more units have entered trigger area ;if so then wait silently ? count _list1 > 0 : goto "wait" ;if not then bird sings and loops nightjar_hunting1_logic say "nightjar_eurasian_hunting" ~20 ;check that player has not left wider trigger area ;if so then go to the playercheck section ?(player distance nightjar_hunting1_logic > 200):goto "playercheck" goto "loop" #wait ~10 ;check again to see if units have left area ;if not wait and check again _list1 = (list nightjar_hunting1_trig) - [nightjar_hunting1_logic] ? count _list1 > 0 : goto "wait" ;if area is clear again restart singing loop goto "loop" #playercheck ;wait for 3 minutes before checking again for player in wider trigger area hint "waiting for player" ~180 ?(player distance nightjar_hunting1_logic > 200):goto "playercheck" goto "loop" If someone could show me how to make this script exec-able by multiple gamelogics please, that would be great. I've tried putting this in the gamelogic: [this, nightjar_hunting1_trig] exec "nightjar_hunting1.sqs" so that the soundsource logic and area check trigger are passed to the script as this select 0 and this select 1, but no matter what I try I can't get the syntax working in-script Cheers, CH
  4. cornhelium

    Looping a sourced sound

    OK, I'm going crazy now  * I have one 500m trigger, set to triggered once by player group, called "nightjar_hunting1_start1". This starts the nightjar_hunting1.sqs when the player first comes into earshot. * Inside that trigger is another 100m trigger, called "nightjar_hunting1_trig". This is there so the script can detect if someone comes too close to the gamelogic in the center. * The gamelogic in the center of these triggers is called "nightjar_hunting1_logic". This actually emits the sounds of a Eurasian Nightjar hunting, when the script tells it to. The problem: It all works fine, except I can't get the script to move to the "playercheck" part. Can anyone tell me where I'm going wrong please? Alternatively, if the script could move between the "loop" and "playercheck" sections depending on the player group's distance from "nightjar_hunting1_logic", I could do away with the big trigger altogether. I'd like to have quite a few of these environmental sounds on the map, and want to cut down on CPU/memory usage as much as possible. nightjar_hunting1.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #loop ;list units in trigger area, excluding the sound source gamelogics _list1 = (list nightjar_hunting1_trig) - [nightjar_hunting1_logic] ;check if more units have entered trigger area ;if so then wait silently ? count _list1 > 0 : goto "wait" ;if not then bird sings and loops nightjar_hunting1_logic say "nightjar_eurasian_hunting" ~20 ;check that player has not left wider trigger area ;if so then go to the playercheck section ? !aP in (list nightjar_hunting1_start1):goto "playercheck" goto "loop" #wait ~10 ;check again to see if units have left area ;if not wait and check again _list1 = (list nightjar_hunting1_trig) - [nightjar_hunting1_logic] ? count _list1 > 0 : goto "wait" ;if area is clear again restart singing loop goto "loop" #playercheck ;wait for 3 minutes before checking again for player in wider trigger area hint "waiting for player" ~180 ? aP in list nightjar_hunting1_start1 : goto "loop" goto "playercheck" Also, if someone could show me how to set up the script so that multiple gamelogic/trigger pairs can exec it please, I'd be eternally grateful. I've tried a few times, but keep getting "type x, expected y" errors Thanks a mil CH
  5. cornhelium

    Advancing in Scripting

    Thanks guys for this thread - very illuminating! I often see lines like this in a script, randomising the position of an object: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _obj1 move [(getpos _marker1 select 0)+100-random 50,(getpos _marker1 select 1)+100-random 50,0] I guess this is meant to randomise the X and Y coordinates of where _obj1 is positioned, within a 100 metre range on either axis. However, shouldn't "+100-random 50" be the other way round? Say the script, on the X axis, subtracts the full 50 meters from the "100", then it will place the object 50 meters East of _marker1, yes? So using "+100-random 50", objects will always appear 50-100m East (x-axis) or North (y-axis) of the reference point, and never West or South? Shouldn't it be "+50-random 100"? Taking the x-axis again, the script would then position the object anywhere from 50 meters West of the reference point to 50 meters East. Therefore, to get proper random positioning either side of a marker, shouldn't the syntax be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_obj1 move [(getpos _marker1 select 0)+50-random 100,(getpos _marker1 select 1)+50-random 100,0] Am I reading this right? Or am I "out biking" Â Cheers, CH
  6. cornhelium

    Looping a sourced sound

    Wow thanks Metal Heart, sorted! This works nicely: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #loop ;approx length of sound to be looped ~3 ;list units in trigger area, excluding the sound source gamelogics _list1 = (list trig1) - [bird1, bird2] ;check if more units have entered trigger area ;if so then wait silently ? count _list1 > 0 : goto "wait" ;if not then bird sings and loops bird1 say "bas_af_attack1" goto "loop" #wait ~20 ;check again to see if units have left area ;if not wait and check again _list1 = (list trig1) - [bird1, bird2] ? count _list1 > 0 : goto "wait" ;if area is clear again restart singing loop goto "loop" So you're moving into the jungle, birds and monkeys ahead of you are happily singing & chattering away. When you get too close, they see you and keep quiet until you've gone away. Or, you set up an ambush on the edge of the same jungle and wait. ...As the enemy approaches the birds and monkeys fall silent, giving you better tactical awareness. Here's a variant with an "alarm call": <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #loop ~3 _list1 = (list trig1) - [bird1, bird2] ? count _list1 > 0 : goto "wait" bird1 say "bas_af_attack1" goto "loop" #wait ;give alarm call bird1 say "bas_af_attack2" ;wait and check to see if units have left area ;if not give alarm call wait and check again ~20 _list1 = (list trig1) - [bird1, bird2] ? count _list1 > 0 : goto "wait" goto "loop" Sure is rewarding when things like this work out. ...hope I can make a full wildlife environment for a mission without lagging it to death  2 variations that would be super-cool: a) alarm call triggers another script, in which there's a chance that any East, West or Guer units within 150m will come towards the soundsource to check it out, then go back to what they were doing b) once an alarm call is made, the script gets the direction of the unit whose presence triggered it. Then, it relocates the trigger and soundsource gamelogic somewhere in a 120 degree cone, 50-150m ahead of that unit, making sure that the new location is on land and waiting 1-5 minutes before starting the whole singing loop up again. As most animals/birds move away from the thing that alarmed them then settle down, this would be pretty realistic, and combined with a) you'd have to plan your approach to the enemy very carefully Cheers, CH
  7. cornhelium

    Looping a sourced sound

    Sorry guys, Scripting f*rtcknocker that I am, I can't get this to work. Using the script below, the sound doesn't stop playing when a unit walks into the trigger area: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _list1 = (list trig1) - [bird1, bird2] _check1 = count _list1 #loop ~2 ? _check1 > 0 : exit bird1 say "bas_af_attack1" goto "loop" Any ideas please? Thanks, CH
  8. cornhelium

    Looping a sourced sound

    Cheers mate CH
  9. cornhelium

    Looping a sourced sound

    Thanks guys, I really appreciate it. One last question from a scripting newbie: what would be the syntax to subtract the gamelogic class from the trigger array? Cheers, CH
  10. cornhelium

    ArmA Progress Updates

    Hi, Sorry if this has already been answered, but does anyone know what operating systems will be supported? I'm still on Windows ME 'til I replace my system next year, but most games now are just XP/2000. Thanks, CH
  11. Sorry to be the bearer of bad news guys, but this might not be advisable. The problem is this: when the fire modes (single, burst, auto) of a weapon and magazine are different, it can cause CTDs when AI use them. As your G36 doesn't have a burst mode, but the JAM G36 mags do, you might run into trouble. As Polish versions of the G36 seem to use single/auto only, sticking with the current setup seems like the best solution. Actually, the JAM_W556_G36_30mag differs only in sound and fire modes from the JAM_W556_30mag - the crucial muzzle velocity, damage and accuracy values are exactly the same. Cheers, CH
  12. cornhelium

    Vietnam: The Experience - v0.2

    Great news Snake Man - this mission is an old favourite of mine. It should come with an addictive substance health warning though I completed ThruYerSternum's last version after about 6 solid hours of play...guess it seeped into my spinal fluid and took control of my nervous system Cheers, CH
  13. cornhelium

    SJB Weapons Pack Released

    Ah, thanks mate. Thought I'd sent you a pistols config snippet a while back, must be thinking of something else. More proof that too much .cpp work sends you senile Cheers, CH
  14. cornhelium

    SJB Weapons Pack Released

    As Gatordev said, Jackal's kindly fixed that in the next edition, with separate pistols for JAM diehards like myself. However, even I have to admit that these beautiful pistols are best by far with Jackal mags  On the Sig P228 and JAM: 'fraid not. For 9mm pistols there's only mags in 8  (PM), 15 and 17 (luger / para) rounds. Cheers, CH
  15. cornhelium

    African Jazz

    Couldn't find a working link to JAM3  JAM3 download. Courtesy of Sanctuary. JAM3 is fully backwards compatible, yes. Good to see you're still pumping out great Tonal scenarios nominesine. This island is still blowing my mind 2 & 1/2 years after release  Cheers mate, CH
  16. cornhelium

    New Light Effects

    Great job mate, those stars around flares always bugged me
  17. cornhelium

    wipman's M4's v0.9

    Wippy, did you test that config I sent you yet? Seemed to work OK to me. Just to make clear: The .cpp I sent you is an edited v0.9 config - not v0.8. I only mentioned 0.8 because that was the wip_m4a1.pbo I used to test with the new wip_JAM_m4a1.pbo ...and in answer to your request: No, I'm not gonna redo the whole thing just to move "_JAM_" from the start tag to the end of each classname   Cheers mate, CH
  18. cornhelium

    wipman's M4's v0.9

    Boomshakalak Wipman! Check your e-mail mate Cheers, CH
  19. cornhelium

    wipman's M4's v0.9

    Hi wipman, No problem. This is what Earl & Suchey did for their weapons. All you would do is do a separate pbo, containing only the JAMed config. This config would look like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class wip_JAM_m4a1 { weapons[] = {"wip_JAM_m4m68",...etc all the weapons you want to convert}; units[]={}; Â Â Â Â requiredAddons[] = {wip_m4a1, JAM_Magazines, BIS_Resistance}; requiredVersion = 1.96; }; }; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgWeapons { class default { }; class Riffle:default { }; class M4:Riffle { }; class wip_m4m68:M4 //repeat from here for all your M4 variants { }; class wip_JAM_m4m68:wip_m4m68 { magazines[]={"JAM_W68_30SAmag","JAM_W68_30SAHDmag"}; }; // etc. }; ...to be honest, it's easier to just add the relevant JAM mags to your existing pbo, as I set out earlier. Unless, for some reason, you want each weapon to fire WIP or JAM mags, but not WIP and JAM mags. Cheers, CH
  20. cornhelium

    wipman's M4's v0.9

    Fair enough mate, Â Just one final thought from me: Hehehe, JAM is a required addon for Blackbloods & UKF units, so your 2 missions only load because you have JAM installed. Other very popular addons that require JAM include: Laser's Delta/Rangers All BAS units including Tonal OpFor Combat! Addons SafetyCatch's Marines DMA Toyota Wars Hyk's US infantry King Homer/Inq/T_D's M1A2 SEP Polish GROM by Offtime Battle Over Hokkaido mod JJR's Middle East Resistance DMA European Resistance Bushfires Lybian Infantry FIA and Desert FIA by SerialKiller Many more... So, many of the units that will carry your weapons in missions will require JAM anyway: whether you add compatibility or not, the memory usage will be the same. Of course, they're your weapons after all and your decision should be respected. Looking forward to seeing them Cheers mate, CH
  21. cornhelium

    wipman's M4's v0.9

    Hehehe. Wippy mate: 1. Say you are playing MP with another player who is using Laser's or Jackal's M4s, or PUKF SA80s. These can all use the same JAM magazine, just like real-life, so you could take magazines from them when you run out of ammo  2. Also, if you all use JAM mags for an MP session, you know that all M4s are shooting with the same accuracy, power etc - so no player has an unfair advantage. JAM3 has 100% new sounds. And 3 alternative soundpacks. The default soundpack uses edited Inquisitor sound for the basic M4, and edited JockoFlocko (MARPAT) sound for the suppressed M4s.  More info here. Cheers, CH
  22. cornhelium

    wipman's M4's v0.9

    Hi Wipman, Adding JAM compatibility is dead simple, and will only take 20 minutes. It would be a shame not to add compatibility, as JAM was designed so that popular addons like the M4 could use each other's mags. All you need to do is copy and paste the following lines into your config... Boom! Your great M4s are now compatible with all the other M4s out there. Â Cheers mate, CH
  23. cornhelium

    LSR Addons

    I think >not< my friend. The DistanceZoom values 260 and 90 represent distances in metres. Leaving the zeros off the end would set the bullet to hit the crosshair at 26 and 9 meters respectively...which would be a disaster   Fair point on the OpticsZoom values though. So, the settings should be: opticsZoomMin=0.017; opticsZoomMax=0.12; distanceZoomMin=260; distanceZoomMax=90; Cheers mate, CH
  24. cornhelium

    LSR Addons

    Yo Laser, Looking forward to your next opus. Regarding your existing US weapons, here are the relevant changes in JAM3 (if you're adding new weapons, there may be more, check final readme in here)... M203 additions: JAM_M576buck (40mm buckshot canister for M203/M79. This was in JAM2 but your M203 doesn't currently fire it). JAM_M433Belt ("mini" version of M433 vest. 12 rounds in 3 slots). M4 Suppressed additions: JAM_W556_30SUBmag , JAM_W556_30SUBHDmag M14/SopMod Suppressed additions: JAM_W762_20SUBmag , JAM_W762_20SUBHDmag M21/SR25 Suppressed addition: JAM_W762Sniper_20SUBmag M60 additions: JAM_W762M_200FSmag , JAM_W762M_200FSHDmag , JAM_W762M_100M60FSmag , JAM_W762M_100M60FSHDmag M240 additions: JAM_W762M_100FSmag , JAM_W762M_100FSHDmag * Lastly, zeroing. Your assault rifles currently inherit DistanceZoom values of 400 from the BIS class Riffle. To reduce the bullet hitting above the crosshairs, I suggest trying values between 150-300. * For the M82, Jackal and I looked at the zeroing for his next weapons update. These settings worked nicely with Jackal's sight and JAM mags, which use initspeed 1555 like yours and King Homer's: opticsZoomMin=0.0170; opticsZoomMax=0.12; distanceZoomMin=260; distanceZoomMax=90; These values look strange, but the rounds hit dead on the 500m, 700m, 900m and 1000m markers at full zoom. In minimum zoom the round follows the <500m markers. The only problem is that the high recoil spoils your view at full zoom, but at these long distances I guess that's realistic Cheers mate, CH
  25. cornhelium

    wipman's M4's v0.9

    If you send me just the config.cpp I'll sort it for you. Check your PM mate Cheers, CH
×