prominentalex Posted April 2, 2014 Report Share Posted April 2, 2014 I have a halo spawn script, and I have a song that plays ONLY when you first spawn in and halo jump. Now, I have a seperate intro song I want to play for players just logging in who have already spawned. Is there anyway to do that? playsound introsong.ogg else playsound introsong2.ogg Link to comment Share on other sites More sharing options...
0 Snakeyes Posted April 2, 2014 Report Share Posted April 2, 2014 I'm curious. How big are those ogg files? Does it add significantly to the load time? Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 2, 2014 Author Report Share Posted April 2, 2014 200kb each, and not noticeably. Link to comment Share on other sites More sharing options...
0 Snakeyes Posted April 2, 2014 Report Share Posted April 2, 2014 I may try this for something new. Do the clients need to do anything special or is it all handled server side? Thanks! :) Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted April 2, 2014 Report Share Posted April 2, 2014 in your init file if you have something like this already put it inside this statement or make a statement something like this on buttom: waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; if (dayzPlayerLogin2 select 2) then { //play sound here for newspawn players }else{ //play sound here for relogging players }; Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 2, 2014 Author Report Share Posted April 2, 2014 Thanks! How do I add an additional song to the Description.ext? class CfgSounds { sounds[] = { introSong }; class introSong { name="introSong"; sound[]={introSong.ogg,0.9,1}; titles[] = {}; }; }; Link to comment Share on other sites More sharing options...
0 MassAsster Posted April 2, 2014 Report Share Posted April 2, 2014 class CfgSounds { sounds[] = { introSong,introSong2 }; class introSong { name="introSong"; sound[]={introSong.ogg,0.9,1}; titles[] = {}; }; class introSong2 { name="introSong2"; sound[]={introSong2.ogg,0.9,1}; titles[] = {}; }; }; Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 3, 2014 Author Report Share Posted April 3, 2014 Thanks! I appreciate the help guys. In the init.sqf should it look like this? p2_newspawn = compile preprocessFileLineNumbers "newspawn\newspawn_execute.sqf"; waitUntil {!isNil ("PVDZE_plr_LoginRecord")}; if (dayzPlayerLogin2 select 2) then { playsound "introSong"; }else{ playsound "introSong2"; }; player spawn p2_newspawn; }; Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 3, 2014 Author Report Share Posted April 3, 2014 I may try this for something new. Do the clients need to do anything special or is it all handled server side? Thanks! :) Server side! Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 4, 2014 Author Report Share Posted April 4, 2014 Any info guys? Link to comment Share on other sites More sharing options...
Question
prominentalex
I have a halo spawn script, and I have a song that plays ONLY when you first spawn in and halo jump. Now, I have a seperate intro song I want to play for players just logging in who have already spawned. Is there anyway to do that?
playsound introsong.ogg
else
playsound introsong2.ogg
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now