Call to prayer script for mission makers (marker version)

  1. 8 years ago
    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.

  2. 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!

  3. Will post what I have in couple of hours. Cheers Spyderl