OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: UH60MG on 02 Jun 2008, 19:45:43
-
Hi,
Want an alarm to play at unspecified times throughout a mission.
Is there a command to play a sound at a given location? I know there's playsound but that just plays the sound as ambient noise.
-
Say Command
http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#277
Regarding the unspecified times, do you mean random intervals between the sound? Ie:
while {alive ROADCONEX} do
{
sleep (random 500);
ROADCONEX say ["alarm",200];
};
The source must be an object (or GameLogic?), it canno't (AFAIK) be a position. It will also stop transmitting on death. A roadcone is used for example above.
-
I suggest using a gamelogic, it cannot be killed/destroyed and can be placed anywhere. Of course, some objects are really easy to use for this purpose.
-
That's just what I was looking for thanks.
A game logic could be used instead of a cone.
-
Also make sure the sound file you use (.ogg) is mono (not stereo).
-
I'm curious, would the sound move if the source object moved?
Like a long fading scream (a single .ogg file), if someone falls off a bridge or building?
-
The aforementioned script seems overly complicated. Try:
gamelogicName say "soundname"
-
would the sound move if the source object moved? Like a long fading scream (a single .ogg file), if someone falls off a bridge or building?
:yes: