Page MenuHomeFeedback Tracker

playsound3d command design issue
Closed, ResolvedPublic

Description

In playsound3d, you need to give a 4th parameter (sound position) in order to be able to adjust the volume, sound pitch and distance parameters (5th, 6th and 7th optional parameters). This is a problem in situations where you want to make a sound effect follow a moving unit and at the same time modify the other optional parameters because "sound position" replaces the "sound source" parameter and the sound effect will thus stay at this position. A better design would be to "override" the "sound source" parameter in order for it to accept both objects and positions. In the case of objects, the sound would follow it, while in the case of a position, the sound source would stay there.

Details

Legacy ID
2435818310
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting
Additional Information

The way out atm is to use say3D instead, but it is less practical as you need o adjust the volume in the config or description.ext. Besides, it does not have the other optionnal parameters present in playsound3D.

Event Timeline

Bohemia edited Steps To Reproduce. (Show Details)Nov 8 2014, 2:00 PM
Bohemia edited Additional Information. (Show Details)
Bohemia set Category to Scripting.
Bohemia set Reproducibility to Always.
Bohemia set Severity to None.
Bohemia set Resolution to No Bug.
Bohemia set Legacy ID to 2435818310.May 7 2016, 7:47 PM

When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.

Bohemia added a subscriber: Bohemia.May 7 2016, 7:47 PM

Sorry, for assuming this behavior of the command then. But it seems less useful than say3D which allows to follow a sound source but is less practical in some aspects.