Jump to content

madbilly

Member
  • Content Count

    37
  • Joined

  • Last visited

  • Medals

Everything posted by madbilly

  1. Hi Joe, My learning continues! You were correct. Once I have the scheduled timing with sleep sorted out I can indeed use the Effects sounds directly. But I'll stick with the explicit script approach. I found an issue with say3D - it only works for the client so is not good for MP missions. So I have had to go to an MP safe version. Replace mylogic say3D ""PMC_Incoming1""; with [mylogic, "PMC_Incoming1",300] call CBA_fnc_globalSay3d; Cheers, Mad Billy
  2. Hi everyone, I am trying to run a trigger to simulate incoming artillery sounds and explosions. As a test I have something like: incomingShell = createSoundSource ["Sound_Alarm", getMarkerPos "_btarget0_g0", [], 0]; nul=createVehicle ["LIB_OF471_HE", getMarkerPos "_btarget0_g0",[], 400, "FLY"]; This plays "Sound_Alarm" noise and then almost immediately the indicated explosion sound "LIB_OF471_HE". I have two problems with this: 1) I would like to know a list of native cfgVehicles sounds that I can use in substitution for "Sound_Alarm". If no good shell sound exists then I will have to define a custom sound. 2) This is harder. Using the createSoundSource[] call, the sound continues playing. I need to close it down. I tried the following, with no success: incomingShell = createSoundSource ["Sound_Alarm", getMarkerPos "_btarget0_g0", [], 0]; sleep 2; deleteVehicle incomingShell; nul=createVehicle ["LIB_OF471_HE", getMarkerPos "_btarget0_g0",[], 400, "FLY"]; The idea above is that the "Sound_Alarm" sound plays for two seconds, then is terminated, then the explosion occurs. However the code above fails with the deleteVehicle call, and this failure prevents the "Sound_Alarm" (or whatever sound is used) from being played at all. I have seen mention of this bug before, but I was wondering if people have elegant and simple scripting means to order, play and cut short sounds at a specific location in MP missions. Cheers, Mad Billy
  3. Hi Joe, The problem is that the trigger sound effects play AFTER the trigger fires. So in my case you would hear an explosion and then you would hear the shell falling. :) I wanted the sounds to play in the reverse order so I had to forget the Effects route and script the sound in order directly. Cheers, Mad Billy
  4. Continuing my journey of discovery about scripting triggers to play sounds in a programmed sequence ... I have now finally understood that createSoundObject is not the best function to use, as it can only recognize a small subset of inbuilt sounds, and I don't want to release custom sounds with every mission I make. The obvious replacement is say3D which has automatic access to all inbuilt sounds I need. The only thing is that say3D is applied to a unit/vehicle/logic object so it cannot be run on a marker. So I have to create an invisible logic object on the map at the location of my barrage target and then get the logic object to say3d the incoming shell noise. The trigger onAct code then looks simply like (for a single incoming shell): _nul = [] spawn { mylogic say3D ""PMC_Incoming1""; sleep 2; nul=createVehicle [""ARTY_Sh_81_HE"", getPos mylogic,[], 100, ""FLY""]; }; "mylogic" is the invisible logic object at the barrage location - I don't need the marker object any more. This is the essence of the solution. In my mission generation script I have elaborated it quite a bit to have a barrage of different ammo types continuing for a configurable total number of shells, fired in short configurable salvoes with a configurable salvo reload period and configurable shot dispersion etc. I have also made it MP-safe by including isServer in the trigger validity condition, so the trigger actions are not replicated on each client. It has taken some time for me to get to this result. I am new to A2 scripting and there is plenty of good advice in old threads on the forums, but you need a certain level of knowledge to understand it. Hopefully others can read this thread and take a couple of shortcuts! Cheers, Mad Billy
  5. OK, I will try to update the code as I solve it. I learnt about the scheduled/non-scheduled issue with sleep. Now I am using a spawn to successfully put together two sounds in the trigger onAct script: _nul = [] spawn { _alarm = createSoundSource ["Sound_Alarm", getMarkerPos "_btarget0_g0", [], 0]; sleep 1; deleteVehicle _alarm; sleep 2; nul=createVehicle ["LIB_OF471_HE", getMarkerPos "_btarget0_g0",[], 100, "FLY"]; }; This works beautifully, so it seems I have answered my second question above. :bounce3: So now I am working on the first question - how to find the correct names of the inbuilt sound effects. The sound I really want to play with createSoundSource is listed under the trigger Effects menu as "PMC - Incoming 1". If selected, this expands to "PMC_Incoming1" inside the .sqm file. So, naively, I tried swapping "PMC_Incoming1" in for "Sound_Alarm" in the createSoundSource. This gives me the following error: No entry bin\config.bin/cfgVehicles.PMC_Incoming1 So what I am trying to do now is learn how to play builtin sounds using createSoundSource for a MP environment. If anyone has any ideas/tips then please let me know. Cheers, Mad Billy
  6. Hi guys, Things are progressing well, but I do have one annoying glitch when I try to use IF clutters in my new maps. Maybe someone can help, I get the following error when I binarize: Error: Clutter lib_clutters\p_phragmites_dark.p3d uses alpha blending - use renderflag AlphaTest instead The same kind of error occurs whenever I use *any* IF clutter objects, e.g. Pshenitsa, Phragmites, ... I tried editing the associated rvmat files and inserted renderFlags[] = {"AlphaTest32"}; But this did not help. When viewing the maps in the A2 editor there is an error reported "Cannot open object lib_clutter\..." and the clutter objects do not appear. This seems to be an old problem but I don't know how to fix it. Any ideas? Cheers, 4S
  7. With good advice from mikero and kju I have managed to get IF objects into the script-generated maps. Here is a screenshot from the Dabryn map showing a haystack, windmill, well and a white house: http://seowhq.net/4Simages/IF/Dabryn_Mill.jpg (191 kB)
  8. Hi guys, I'm back now from vacation. Any feedback on the 3 demo maps? Cheers, MB / 4S
  9. Thanks for the positive responses! And, just before I leave my keyboard for 2 weeks vacation :bounce3:, let me say that yes, all SEOW software is freely available under GPL. SEOW is not a closed project - we are a team of people around the world and new contributors and play testers are always welcome. Check out http://seowhq.net/ for the TS server etc. Cheers, MB / 4S
  10. Hi all, Is it possible to develop a script to find all object locations and status data at the end of a mission and dump them to a text file? You see I am interested in operating a sequence of IFL1944 missions with an external campaign system, and I need to work out how to communicate between the campaign system and IFL1944: text files are a start. Cheers, MadBilly
×