
All checks were successful
Build / Build (push) Successful in 28s
This commit updates the documentation for several Forge modules, adding comprehensive details about their functionalities, user interfaces, and integration with other systems. Key enhancements include: - Expanded descriptions for the Admin, Arsenal, Bank, Garage, Interaction, Locker, Medical, Organization, Service, Store, and other modules. - Added new features such as financial operations, user interface improvements, and integration with organization systems. - Improved clarity on usage instructions and configuration options across modules. These changes aim to provide better guidance for users and developers interacting with the Forge client system.
2.4 KiB
2.4 KiB
Forge Ambient Module
Overview
The Ambient module provides environmental sound management for the Forge client system. It enables the creation and management of ambient sound effects in the game environment, enhancing the immersive experience for players.
Dependencies
- forge_client_main
Authors
- J. Schmidt
- Creedcoder
- IDSolutions
Features
Sound Management
-
Ambient Sound System (
fnc_ambientSound.sqf
)- Creates and manages sound sources in the game world
- Handles sound effect playback and cleanup
- Supports timed and continuous sound effects
-
Sound Source Features
- Dynamic sound source creation
- Position-based sound placement
- Automatic cleanup of sound sources
- Support for various sound types and durations
-
Sound Control
- Lifecycle management of sound sources
- Automatic cleanup when source is destroyed
- Configurable sound duration
- Position tracking for moving sound sources
Event Handlers
The module uses several event handlers for initialization and execution:
XEH_preInit.sqf
: Pre-initialization setupXEH_postInit.sqf
: Post-initialization tasksXEH_preStart.sqf
: Pre-start configurationXEH_postInit_client.sqf
: Client-specific post-initializationXEH_preInit_server.sqf
: Server-specific pre-initialization
Usage
To use the ambient module:
- Ensure the module is properly loaded in your mission
- Create sound sources using the ambient sound function:
[source, "sfx_sound_name"] spawn forge_client_ambient_fnc_ambientSound
- Optionally specify a duration for temporary sounds:
[source, "sfx_sound_name", duration] spawn forge_client_ambient_fnc_ambientSound
Parameters
The ambient sound function accepts the following parameters:
source
: The object or position where the sound will be playedsfx
: The name of the sound effect to playtime
(optional): Duration in seconds before the sound is removed
Debugging
Debug mode can be enabled by uncommenting the following in script_component.hpp
:
#define DEBUG_MODE_FULL
Version Information
Version information is managed through the main Forge client system configuration.
Technical Details
- Supports both object-attached and position-based sound sources
- Automatic cleanup of sound sources when source is destroyed
- Configurable sound duration for temporary effects
- Efficient sound source management
- Client-side sound processing