Page MenuHomeFeedback Tracker

1.72 say3D / Description.ext maxDistance Default
New, NormalPublic

Description

Prior to 1.72, Syntax 1 of say3D (_this say3D _sound) would use a default maxDistance of unlimited(?) if not specified in the related CfgSounds entry for the sound played.

After 1.72, it seems that this syntax plays with a maxDistance of approximately 100 Meters (based on testing with alternate syntax (_this say3D[_sound,_distance])

This may be an error, or it may be intentional. If intentional, can we please have documentation to this effect added to https://community.bistudio.com/wiki/Description.ext#CfgSounds and/or https://community.bistudio.com/wiki/say3D

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Add custom sound to Description.ext:

class CfgSounds
{
  sounds[] = {};

  class SirenMedic
  {
    name = "SirenMedic";
    sound[] = {"\sounds\Siren_Medic.ogg", 1.0, 1};
    titles[] = {};
  };
};

Execute from within a vehicle:

_veh = vehicle player;
life_sirenLogic = "Land_ClutterCutter_small_F" createVehicle ([0,0,0]);
life_sirenLogic attachTo [_veh,[0,1,0]];
titleText ["Sirens On","PLAIN"];
[[[_veh,life_sirenLogic], {

    private["_vehicle","_clip"];
    _vehicle = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
    _logic = param[1];
    if(isNull _vehicle) exitWith {systemchat "no 1"};
    hideObject _logic;
    while {true} do
    {
        if(count (crew (_vehicle)) == 0) exitWith {systemchat "no 2"};
        if(!alive _vehicle) exitWith {systemchat "no 3"};
        if(isNull _vehicle || isNull _logic) exitWith {systemchat "no 4"};
        _logic say3D "SirenMedic";
        sleep 15;
        deleteVehicle life_sirenLogic;
    };

}], "BIS_fnc_spawn", true, false, false] call BIS_fnc_MP;

The sound will be incredibly quiet, to the point that it cannot be heard beyond a few dozen meters over the sound of the vehicle it is being played from (i.e, someone standing 50 meters away will hear only the car engine). For a representation of how this command behaved prior to 1.72, use the following:

_veh = vehicle player;
life_sirenLogic = "Land_ClutterCutter_small_F" createVehicle ([0,0,0]);
life_sirenLogic attachTo [_veh,[0,1,0]];
titleText ["Sirens On","PLAIN"];
[[[_veh,life_sirenLogic], {

    private["_vehicle","_clip"];
    _vehicle = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
    _logic = param[1];
    if(isNull _vehicle) exitWith {systemchat "no 1"};
    hideObject _logic;
    while {true} do
    {
        if(count (crew (_vehicle)) == 0) exitWith {systemchat "no 2"};
        if(!alive _vehicle) exitWith {systemchat "no 3"};
        if(isNull _vehicle || isNull _logic) exitWith {systemchat "no 4"};
        _logic say3D ["SirenMedic", 650];
        sleep 15;
        deleteVehicle life_sirenLogic;
    };

}], "BIS_fnc_spawn", true, false, false] call BIS_fnc_MP;

Event Timeline

Gnashes created this task.Jun 30 2017, 3:19 PM
Gnashes edited Steps To Reproduce. (Show Details)
jokoho482 added a subscriber: jokoho482.EditedJul 2 2017, 2:55 AM

I also noticed that effect. I think for some enhancement sound mods like ES and DS2 this is important to get looked into and resolved if that was intentional. i now switched to the 2nd syntax to temp fix it.