Call to prayer script for mission makers (marker version)

  1. ‹ Older
  2. 8 years ago

    @incontinenetia This is a defining moment in my Arma 3 scripting career... I've actually found a solution to an error. It feels strangely profound. Think I might have to have some champagne to celebrate.

    Hehe, when it's your own script it usually ends up with you wondering what could have been done in the time you just lost.

  3. Edited 8 years ago by incontinenetia

    Well thanks for the inspirational pep talk there buddy! But yeah, that's not really something I want to think about all that hard...

  4. I'll post the mission tomorrow once I've added in all the stuff. Going to call it a night for now! Cheers again dude.

  5. Edited 8 years ago by HeroesandvillainsOS

    Are you posting a mission or a map template with CTP enabled that we can merge onto our own FATA missions? Either answer is a good answer. Just curious.

  6. First post updated! Cheers for help everybody. @HeroesandvillainsOS  yes it's a template, but have a look before merging as I've added a few minarets to the map in certain areas.

  7. Edited 8 years ago by HeroesandvillainsOS

    @incontinenetia First post updated! Cheers for help everybody. @HeroesandvillainsOS  yes it's a template, but have a look before merging as I've added a few minarets to the map in certain areas.

    Sweet. :) Congrats on getting that working. I'm grateful.

    Install instructions?

    Edit: Not at home but I'm assuming it's a mission.sqm with the CTP description.ext, init.sqf and sound folder. If so, how do I get it into my current mission with EDEN?

  8. Install instructions should be the same as before, copy the CallToPrayer folder to the root of your mission folder.

    Then add these lines to the respective files

    Init.sqf

    call compile preprocessFile "CallToPrayer\init.sqf";

    description.ext

    class CfgSounds {
    	sounds[] = {prayer};
    	class prayer {
    		name = "prayer";
    		sound[] = {"CalltoPrayer\sounds\prayer.ogg", db+1, 1};
    		titles[] = {};
    	};
    };
  9. Edited 8 years ago by HeroesandvillainsOS

    @SpyderBlack723 Install instructions should be the same as before, copy the CallToPrayer folder to the root of your mission folder.

    Then add these lines to the respective files

    Init.sqf

    call compile preprocessFile "CallToPrayer\init.sqf";

    description.ext
    class CfgSounds { sounds[] = {prayer}; class prayer { name = "prayer"; sound[] = {"CalltoPrayer\sounds\prayer.ogg", db+1, 1}; titles[] = {}; }; };

    I just edited my post for clarity. Sorry.

    I meant more along the lines for how to merge the mission.sqm into my current mission. Never done it with EDEN. If there's not a mission.sqm here then disregard

  10. Edited 8 years ago by SpyderBlack723

    Oh.. yeah no clue how to merge within EDEN...

  11. Edited 8 years ago by HeroesandvillainsOS

    In 2D I messed it up bad using Autigergrad's sound pack. I did it backwards. I tried to merge from the template mission.sqm rather than merging from my actual mission. That was the wrong way. Now I don't even see a merge button with EDEN. LOL!

  12. @HeroesandvillainsOS  Sweet. :) Congrats on getting that working. I'm grateful.

    Install instructions?

    Edit: Not at home but I'm assuming it's a mission.sqm with the CTP description.ext, init.sqf and sound folder. If so, how do I get it into my current mission with EDEN?

    Download the file bud! There's a readme.

  13. @SpyderBlack723 Install instructions should be the same as before, copy the CallToPrayer folder to the root of your mission folder.

    Then add these lines to the respective files

    Init.sqf

    call compile preprocessFile "CallToPrayer\init.sqf";

    description.ext
    class CfgSounds { sounds[] = {prayer}; class prayer { name = "prayer"; sound[] = {"CalltoPrayer\sounds\prayer.ogg", db+1, 1}; titles[] = {}; }; };

    There's a few differences (naming markers etc.) but it's all written in the file. I'll update the first post with them too though.

  14. Edited 8 years ago by DaVidoSS

    I am using little different script found somewhere on BI forums:

    private ["_mosque", "_times_to_play", "_played_times", "_i"];
    _mosque = [minarete_1,minarete_2,minarete_3,minarete_4,minarete_5,minarete_6,minarete_7];
    _times_to_play = [5, 12, 15, 18, 19];
    _played_times = [0, 0, 0, 0, 0];
    _i = 0;
    while {true} do
    {
       _i = 0;
       {
          if (abs (dayTime - _x) < 0.05) then
          {
             if ((_played_times select _i) == 0) then
             {
                _played_times set [_i, 1];
                {_x say3D "Muezzin"} forEach _mosque;
             };
          };
          _i = _i + 1;
       } forEach _times_to_play;  
    
       if (dayTime > ((_times_to_play select 4) + 0.1)) then
       {
          _played_times = [0, 0, 0, 0, 0];
       };
    
       Sleep 10;
    };

    You need to place 7 objects (maybe speakers) in desired areas called minarete_1,minarete_2,minarete_3,minarete_4,minarete_5,minarete_6 and minarete_7

    and execute the script on player.
    Sound classname is "muezzin".
    Every 6 hours you get prayers sound on each those locations.

  15. Quick update: changed the download to have the appropriate times for Kabul in 2016 and added more detailed instructions. Download link in the first post.

  16. Edited 8 years ago by incontinenetia

    @DaVidoSS I am using little different script found somewhere on BI forums:

    private ["_mosque", "_times_to_play", "_played_times", "_i"];
    _mosque = [minarete_1,minarete_2,minarete_3,minarete_4,minarete_5,minarete_6,minarete_7];
    _times_to_play = [5, 12, 15, 18, 19];
    _played_times = [0, 0, 0, 0, 0];
    _i = 0;
    while {true} do
    {
       _i = 0;
       {
          if (abs (dayTime - _x) < 0.05) then
          {
             if ((_played_times select _i) == 0) then
             {
                _played_times set [_i, 1];
                {_x say3D "Muezzin"} forEach _mosque;
             };
          };
          _i = _i + 1;
       } forEach _times_to_play;  
    
       if (dayTime > ((_times_to_play select 4) + 0.1)) then
       {
          _played_times = [0, 0, 0, 0, 0];
       };
    
       Sleep 10;
    };

    You need to place 7 objects (maybe speakers) in desired areas called minarete_1,minarete_2,minarete_3,minarete_4,minarete_5,minarete_6 and minarete_7

    and execute the script on player.
    Sound classname is "muezzin".
    Every 6 hours you get prayers sound on each those locations.

    Does this need a download or sound config entry at all? Looks like a pretty useful alternative too!

  17. Edited 8 years ago by DaVidoSS

    In description.ext

    class CfgSounds	{
    	
    	sounds[] = {Muezzin};
    
    		class Muezzin	{
    		
    			name="Muezzin";
    			sound[]={"sounds\muezzin.ogg",db+8,1.0};
    			titles[] = {};
    			
    		};
    };

    And sound file called muezzin.ogg in sounds directory

    muezzin.ogg

  18. Edited 8 years ago by HeroesandvillainsOS

    I'm getting an odd error. I can't load the sample mission.sqm. "CUP_A2_minaret_porto_ep1 no longer exists."

    "We were not able to open the mission due to missing addon(-s) (CUP_A2_EditorObjects)"

  19. Do you use CUP terrains?

  20. Ah. I take it CUP Terrains required, eh? LOL! I use AiA. Sorry, brain freeze. When I saw CUP for whatever reason I forgot they had a terrain pack. I never use it. I was thinking it meant like CUP units or something and I was like, that can't be right! Wow. Sorry. No I didn't try it with CUP Terrains. Stupid post of the year.

  21. Edited 8 years ago by HeroesandvillainsOS

    Alright. So I added the CTP manually to FATA and successfully had the towers spawn where I placed them but I get no sound at the CTP times of day.

    I'll probably ask for someone to look at my mission file if I can't get clarification on this but just to double check:

    1. Will this work with AiA?
    2. When you say to use an empty marker, you mean the one under "Strategy" then "empty" correct? It looks like an empty dotted circle?
    3. To properly name them using your file, you have "CTP1" "CTP2" in quotes. When I name the marker, I call them CTP1 and CTP2 (etc) without the quotes, right?
  22. Newer ›
 

or Sign Up to reply!