-
Notifications
You must be signed in to change notification settings - Fork 1
Sound Source
Mike-MF edited this page Jun 18, 2024
·
1 revision
This page will explain the usage of the Sound Source function.
/*
* Author: Mike
* Plays a looping sound via createSoundSource with optional automatic deletion.
* Supports custom sounds for loop created through Description.ext
* If deletion time is greater than 0 it will automatically delete it after the delay specified.
*
* Call on the server only.
*
* Arguments
* 0: Object <OBJECT>
* 1: Sound <STRING>
* 2: Time until deletion <NUMBER> (default: 0)
*
* Return Value:
* Sound Source <OBJECT>
*
* Example:
* [Loudspeaker, "Sound_Alarm", 30] call MFUNC(soundSource)
* GVAR(myLoudSpeakerSound) = [Loudspeaker, "Sound_Alarm"] call MFUNC(soundSource)
*/
This function creates a looping sound with optional automatic deletion. It can be used for Alarms, firefight effects or any custom made sound. The return from this function is the sound source itself which must be used to delete the sound when you no longer require it.
Call on the server only
Example:
GVAR(myLoopingSound) = [My_Speaker_Object, "Sound_Alarm"] call MFUNC(soundSource);
Example with auto deletion:
[My_Speaker_Object, "Sound_Alarm", 300] call MFUNC(soundSource);
Pages
- Home
- Your First Mission
- Creating A Mission
- Contract Missions
- Difficulty Guidelines
-
Functions Library
- Base Spectator
- Bomber
- Car Alarm
- Chemical Detector
- Collect Intel
- Connect Battery To Defusable
- Contamination Gas
- Count Alive
- Dialogue
- Disable AI
- Download Intel
- Earthquake
- Enable AI
- Force Shooting
- Ground Fog
- Hunt
- Lock Doors
- Mark Buildings
- Monitor Units
- Mortar Strike
- Ping
- Players
- Reaction
- Reinforcements
- Reinforcement Waves
- Respirator Effects
- Set Sleeping
- Sound Source
- Surrender
- Switch Action
- Teleport
- Toggle Lights
- Trigger Area
- Helicopters
- Resources
- Quality Checklist
- Useful Commands
- ArmaQDL