Sign in to follow this  
Followers 0

Having a radio or object play music

2 posts in this topic

I've been trying to get a object play a sound, which I have done in editor, but can't get going in game. This is what I have so far

in my initserver.sqf

["Land_BackAlley_01_l_gate_F", [9053.12, 16061.4, 134.402], [-0.961636, 0.274328, 0], [0, 0, 1], true]

    private _vehicle = (_x select 0) createVehicle (_x select 1);
    _vehicle allowDamage false;
    _vehicle setPosWorld (_x select 1);
    _vehicle setVectorDirAndUp [_x select 2, _x select 3];
    _vehicle enableSimulationGlobal (_x select 4);
    _vehicle setVariable ["ExileIsLocked", -1, true];

    _vehicle ="sam"; //i want to name the object sam, is this how??

I execute the script below in the init


[[while {true} do

                  playSound3D ["A3\music_f\Music\AmbientTrack01a_F.ogg", sam, false, getPos sam, 30, 1, 80];
                  sleep 60;
              ,"",true,true,false] call BIS_fnc_MP;

Every 60 seconds the song should repeat.  I'm guessing i've just named the object wrong? Thanks

Share this post

Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.