Jump to content
Sign in to follow this  
burdy

Problem with Radio Script

Recommended Posts

Hello, I am working for a script to have a radio system in the helicopters (E.G : Battlefield Vietnam).

The script has 3 parts:

The Main Part That actually runs the songs

if (isServer) then
{

while {true} do 
{
this = songs;
s1 say3D "song";s3 say3D "song";s5 say3D "song";sleep 174;
s1 say3D "ending";s3 say3D "ending";s5 say3D "ending";sleep 161;
s1 say3D "ramblin";s3 say3D "ramblin";s5 say3D "ramblin";sleep 140;
s1 say3D "ccr";s3 say3D "ccr";s5 say3D "ccr";sleep 158;
s1 say3D "house";s3 say3D "house";s5 say3D "house";sleep 248;
s1 say3D "dress";s3 say3D "dress";s5 say3D "dress";sleep 195;
s1 say3D "hill";s3 say3D "hill";s5 say3D "hill";sleep 91;
s1 say3D "rigby";s3 say3D "rigby";s5 say3D "rigby";sleep 125;
s1 say3D "heyhey";s3 say3D "heyhey";s5 say3D "heyhey";sleep 169;
}
};

The Radio On Part

if (isServer) then
{s1 attachTo [h1,[0,0,0]]}

And The Radio Off Part

if (isServer) then
{s1 attachTo [z1,[0,0,0]]}

Now the two main problems I am having is that 1) The main script does not sync with the clients on a MP server so everyone hears a different part of the song, and 2) The Main problem I am having is that when the script S attaches to H (S being invisible object and H helicopter) the song resets itself. This leads to the songs eventually overlapping due to one part of the script resetting constantly but the sleep part still running, so eventually you have 7 different songs playing over one. How can I fix this/prevent the song from resetting when I attach the object? Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×