Jump to content
Sign in to follow this  

Recommended Posts

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...

Share this post


Link to post
Share on other sites

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:-

_dude = (_this select 0) select 0;

playsound "allahuakhbar";
sleep 5;
_bomb = "Bo_GBU12_LGB" createVehicle getpos _dude;

Call it with this from your triggers OnAct...

nul = [thislist] execVM "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:-

class CfgSounds
{
sounds[]= {allahuakhbar};

class allahuakhbar
{
	name = "allahuakhbar";
	sound[] = {allahuakhbar.ogg, 1, 1.0};
	titles[] = {};
};

};

Good luck!

Edited by twirly
Clarity & added stuff

Share this post


Link to post
Share on other sites

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

_bomber = _this select 0;
_unitname = _this select 1;
_bomber say3D "allahuakhbar";

hope its of some use

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×