gc8 981 Posted December 26, 2018 Hi I'm trying to play some sound but when I wanted to change the sound volume I found that playSound3D doesn't really work with many parameters. This works: playSound3D ["A3\Sounds_F\sfx\alarm_blufor.wss", player]; But this doesn't: playSound3D ["A3\Sounds_F\sfx\alarm_blufor.wss", player, false, [0,0,0], 3, 1, 0]; Any one know why? thx! Share this post Link to post Share on other sites
POLPOX 779 Posted December 26, 2018 If the 3rd argument (position) is passed to the command, the 1st argument (source) will not work anymore. So, your code is working actually but in [0,0,0]. 1 Share this post Link to post Share on other sites
gc8 981 Posted December 26, 2018 11 minutes ago, POLPOX said: If the 3rd argument (position) is passed to the command, the 1st argument (source) will not work anymore. So, your code is working actually but in [0,0,0]. I read that from wiki but I thought [0,0,0] was default argument. Anyway got it working now, thx POLPOX! But how do I make the sound follow player then? Edit: I guess the sound cannot follow the player? Is there command for that? Share this post Link to post Share on other sites
AZCoder 921 Posted December 26, 2018 No this command/sound will not follow the player. The say commands do, although they attenuate heavily and not as easy to hear. 1 Share this post Link to post Share on other sites
gc8 981 Posted December 26, 2018 So how come this wont work: (description.ext) class CfgSounds { sounds[] = {}; class TestSound1 { sound[] = {"A3\Sounds_F\sfx\alarm_blufor.wss",3,1,0}; name = "TestSound1"; titles[] = {}; }; }; (init.sqf) playSound "TestSound1"; I get no sound Share this post Link to post Share on other sites
AZCoder 921 Posted December 26, 2018 the last parameter in your sound[] line is 0, that's the distance for the sound, try making it 100 or just remove it (I never use it) Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 26, 2018 1 hour ago, gc8 said: playSound "TestSound1"; You need playSound3D for this. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 26, 2018 you can attach a say3d also ex. : _your_pos = "#particlesource" createVehicle [0,0,0]; _your_pos attachTo [_this, [0,0,0]]; 1 Share this post Link to post Share on other sites
AZCoder 921 Posted December 26, 2018 1 hour ago, GEORGE FLOROS GR said: You need playSound3D for this. no no, I think gc8 is just trying a simple playSound test and it wasn't working, but I think say3D might give the right result if if the config is correct Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 13 hours ago, GEORGE FLOROS GR said: You need playSound3D for this. What's wrong with playSound? Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 13 hours ago, AZCoder said: the last parameter in your sound[] line is 0, that's the distance for the sound, try making it 100 or just remove it (I never use it) I tried removing it and making it 100 but nothing works Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 1 hour ago, gc8 said: What's wrong with playSound? What exacly you want to succeed? Play just a sound for player ? for everyone ? a 3d sound ? Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 3 minutes ago, GEORGE FLOROS GR said: What exacly you want to succeed? Play just a sound for player ? for everyone ? a 3d sound ? play a sound for every player. I also want to attach sound to some object but first I wanted to test all the commands out :) Didn't quite understand your attachTo example 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 You can use either playSound3D or say3d for a 3d sound . If you want to play not a 3d sound then you can use playsound. If you want to play the arma 3d sounds like the alarm , you have to use the playSound3D , like the .wss above. You don't need also to add this in the cfgsounds at the description. I don't think so , that you can use the playsound for the game sounds .wss , but i haven't also test this. For the say3d , to attachto you can creavehicle a #particlesource and then attach it to your object . You can also check in my scripts for the examples. Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 @GEORGE FLOROS GR Thanks, I will try those commands later but I would still like to make the playSound work just out of curiosity. Maybe I'll make a new thread for that. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 45 minutes ago, gc8 said: make the playSound The certain? 22 hours ago, gc8 said: "A3\Sounds_F\sfx\alarm_blufor.wss" Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 27 minutes ago, GEORGE FLOROS GR said: The certain? wiki says playsound: "Selects sound from Description.ext#CfgSounds or config.cpp." Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 i just tested and i don't think that you can play a 3d sound as plain sound. You can play this as a 3d : add in the init of an object: playSound3D ["A3\Sounds_F\sfx\alarm_blufor.wss", this]; Might be that you want to do something else ? Because i remember that you were asking how to play the sounds in unsung. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 Ok i just noticed the @ It is working. so it's : //__________________________ *** C O P Y T H I S *** __________________________ class CfgSounds { sounds[] = {}; class sound_1 { name = "sound_1"; // start path to sound file in AddOn with @ sound[] = { "@A3\Sounds_F\sfx\alarm_blufor.wss", 0.8, 1, 100 }; titles[] = { 0, "" }; }; }; add this in an .sqf waituntil {time > 3}; // for the test playSound "sound_1"; hint"test"; 1 Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 5 minutes ago, GEORGE FLOROS GR said: Might be that you want to do something else ? I would like the sound to follow with vehicle Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 1 minute ago, GEORGE FLOROS GR said: Ok i just noticed the @ Hey it works! Thanks George. One problem less :) 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 Just now, gc8 said: I would like the sound to follow with vehicle So you are doing this wrong ! The above example is how to play a sound from an addon as a (plain) playsound and not as a 3d. so in order to do this: ( hold on) Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted December 27, 2018 This sound has a small duration so you need to loop this . you could use this : _particlesource = "#particlesource" createVehicle [0,0,0]; _particlesource attachTo [_this, [0,0,0]]; playSound3D ["A3\Sounds_F\sfx\alarm_blufor.wss", _particlesource]; but it's not needed since it will stop on the next seconds So just loop this : playSound3D ["A3\Sounds_F\sfx\alarm_blufor.wss", _this]; Share this post Link to post Share on other sites
gc8 981 Posted December 27, 2018 @GEORGE FLOROS GR Thanks but I don't think that works because the sound is not following _particlesource, it just is created at the position of _particlesource. It states this in the wiki at one of the comments. Share this post Link to post Share on other sites
AZCoder 921 Posted December 27, 2018 Why not use say3D like you mentioned earlier @GEORGE FLOROS GR? If you loop playsound3D it will create a bunch of alarms, even if short-lived, but could be good for a torture scene :-D 1 Share this post Link to post Share on other sites