tinboye

infistar Alarm Custom Sound?

13 posts in this topic

Hey  @infiSTAR  can you tell me please if its possible to use a custom sound ogg file for the restart server? Like if i was to specify a sound in my mission pbo for cfgsounds, then put that class in the field would it know to look for the sound class, or is this something thats not possible to set as a custom thing?

 

thanks in advance

Share this post


Link to post
Share on other sites

You might be able to do it by adding something like the code below to your description.ext and then calling to the the name of the sound you added. In the code below, the .ogg files would be in the root of your mission file. I'm sure you could place them in a folder called sounds and then the "sound[]" line would be like so "sound[] = {"sounds\myalarm1.ogg", 25, 1};"

I've not tried this with infiSTAR. But I do use it in other ways.

class CfgSounds
{
  sounds[] = {myalarm1,myalarm2};
	class myalarm1
	{
		name = "myalarm1";
		sound[] = {"myalarm1.ogg", 25, 1};
		titles[] = {};
	};
	class myalarm2
	{
		name = "myalarm2";
		sound[] = {"myalarm2.ogg", 1, 1};
		titles[] = {};
	};
};

 

Edited by Kurewe

Share this post


Link to post
Share on other sites
Advertisement
4 hours ago, Kurewe said:

You might be able to do it by adding something like the code below to your description.ext and then calling to the the name of the sound you added. In the code below, the .ogg files would be in the root of your mission file. I'm sure you could place them in a folder called sounds and then the "sound[]" line would be like so "sound[] = {"sounds\myalarm1.ogg", 25, 1};"

I've not tried this with infiSTAR. But I do use it in other ways.


class CfgSounds
{
  sounds[] = {myalarm1,myalarm2};
	class myalarm1
	{
		name = "myalarm1";
		sound[] = {"myalarm1.ogg", 25, 1};
		titles[] = {};
	};
	class myalarm2
	{
		name = "myalarm2";
		sound[] = {"myalarm2.ogg", 1, 1};
		titles[] = {};
	};
};

 

then change it here in Infi:

RESTART_WARNING_SOUND = ""; // for example: Alarm or air_raid

1 person likes this

Share this post


Link to post
Share on other sites
5 minutes ago, RAKETA said:

then change it here in Infi:

RESTART_WARNING_SOUND = ""; // for example: Alarm or air_raid

True. I guess I could have clarified a bit when I said "then calling to the the name of the sound you added."

Share this post


Link to post
Share on other sites

OP hasn't replied back as to whether this worked for him or not. I'm kinda curious though.

Share this post


Link to post
Share on other sites

it being easter and all I probably will not get to this today, i will keep you updated if this works.

 

Share this post


Link to post
Share on other sites

Should work, can't really test it but I don't think I'd see why it wouldn't work. ;)

PS: It might be too loud tho, you can change that here:

// filename "myalarm1.ogg", volume "25", pitch "1", distance (otpional, used for playSound3D IIRC)
sound[] = {"myalarm1.ogg", 25, 1};

 

(that sound is defined on all clients, all clients have it (mission-file), and IIRC the AH executes the playsound on all clients)

Edited by xBowBii

Share this post


Link to post
Share on other sites

So had a bit of time, tried it out, and this works as i first asked.

just add your ogg file into sounds folder in your mission.pbo,

either add

Spoiler

class CfgSounds
{
  sounds[] = {alarm1};
	class myalarm1
	{
		name = "alarm1";
		sound[] = {"sounds\alarm1.ogg", 25, 1};
		titles[] = {};
	};
};

 

into description.ext, OR add

#include "CfgSounds.hpp"

into description.ext and then save the CfgSounds class info into that file.

then in infistar config

RESTART_WARNING_SOUND = "alarm1";	/* for example: Alarm or air_raid */

save sqf, repbo, start up server and should work fine.

Edited by tinboye
1 person likes this

Share this post


Link to post
Share on other sites
6 minutes ago, tinboye said:

So had a bit of time, tried it out, and this works as i first asked.

Cool. Good to hear it worked. :rock:

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.