Results 1 to 4 of 4

Thread: Play Sound?

  1. #1

    Play Sound?

    I have an OGG file that I made of an Akbar sound. I want to make it when a soldier gets within the trigger area, it will play the sound than wait a few sec. before exploding. What action would I use to call this script or sound and how would i create the delay between the sound and explosion? THanks...
    F.R.A.G. Force Recon Assault Group |Cunico|

  2. #2
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    I tried putting this all in a trigger... not sure why it wasn't working but too much time spent so ended up doing it this way.

    Create a script in your mission folder called "blowup.sqf".

    blowup.sqf:-
    PHP Code:
    _dude = (_this select 0select 0;

    playsound "allahuakhbar";
    sleep 5;
    _bomb "Bo_GBU12_LGB" createVehicle getpos _dude
    Call it with this from your triggers OnAct...

    PHP Code:
    nul = [thislistexecVM "blowup.sqf"
    If you don't already have a description.ext in your mission folder...create one and put this in it. Make sure you have the sound file... and also make sure you either save or reload the mission after making changes to description.ext... or the changes won't be applied and you'll wonder what the hell is going on!

    description.ext:-
    PHP Code:
    class CfgSounds
    {
        
    sounds[]= {allahuakhbar};

        class 
    allahuakhbar
        
    {
            
    name "allahuakhbar";
            
    sound[] = {allahuakhbar.ogg11.0};
            
    titles[] = {};
        };

    }; 
    Good luck!
    Last edited by twirly; Jun 24 2012 at 22:19. Reason: Clarity & added stuff

    "Learn by doing!" - Quoted from a post by Imutep

    OUTERRA - OUTERRA - OUTERRA - OUTERRA - BLOWMIND!

  3. #3
    Gunnery Sergeant Mikie boy's Avatar
    Join Date
    Jun 20 2009
    Location
    United Kingdoom
    Posts
    478
    Just for infor - for MP- i used the following when calling (this was from a script not a trigger);

    [nil,nil,rEXECVM,"bombcry.sqf",[_bomber,_target]] call RE; //must have _bomber who is to shout, and _target object to hear listed

    same set up with config as mentioned by twirly

    bombcry.sqf
    Code:
    _bomber = _this select 0;
    _unitname = _this select 1;
    _bomber say3D "allahuakhbar";
    hope its of some use
    [FOCK] Mikie J

    Looking for New Players at Fockersteam
    http://fockers.moonfruit.com/

    A2/OA
    COOP Most Wanted - [Fockers] Most Wanted Co-x v07-09-2012
    Fock IED - http://www.armaholic.com/page.php?id...highlight=FOCK
    Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=20580

    A3
    TvTCache Hunt - [FOCK]ers Cache Hunt TvT-x [ALPHA]
    Scripting Tutotial -http://www.armaholic.com/page.php?id=20465#comments
    Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=19041

  4. #4
    Sergeant Whyte_Out's Avatar
    Join Date
    Jan 25 2011
    Location
    Casper, Wyoming
    Posts
    181
    Author of the Thread
    Hmm... I will try these thank you guys.

Similar Threads

  1. Play sound serverside
    By soundblaster in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: May 9 2012, 12:53
  2. Play sound with trigger?
    By Frosties in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 8
    Last Post: Dec 5 2010, 18:17
  3. addAction play sound for all ?
    By gnu-06 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 3
    Last Post: Sep 12 2008, 18:40
  4. Question about how to play a sound
    By mrbean1112 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 3
    Last Post: Jan 24 2005, 11:31
  5. Sound card can't play....
    By russin in forum TROUBLESHOOTING
    Replies: 7
    Last Post: May 1 2002, 06:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •