Nemaconz Posted April 26, 2015 Report Share Posted April 26, 2015 So in A2 I had no problem using the below string in my mission file to get sounds to play at random: [nil,_this,rSAY,[["sound1","sound2","sound3"] call BIS_fnc_selectRandom, 20]] call RE; I even used it on server side files with no problem. But when I try it in A3 it's a no go. I verified that my sounds are listed correctly in the description.ext because I can get them to fire off using: playSound "sound1"; I want these sounds to occur at random, is there a new method for doing this? I also tried this with no success, I put this at the top where I defined my other variables: _sound = ["soundClass1","soundClass2","soundClass3"] call BIS_fnc_selectRandom; and then used this _test spawn { while {alive _this} do { sleep 5; playsound _sound; sleep 5; }; }; later on down the line after I kicked off the script. Anyone got any ideas? Worked fine in A2, not sure what to do with it in A3. Thanks! Link to comment Share on other sites More sharing options...
KiloSwiss Posted April 26, 2015 Report Share Posted April 26, 2015 You can't use RE (RemoteExecution) in A3, it has been replaced with BIS_fnc_MP but You can't use that in Epoch. Link to comment Share on other sites More sharing options...
Nemaconz Posted April 27, 2015 Author Report Share Posted April 27, 2015 Interesting, well that explains that. Wonder why the second way I tried it isn't working. Do you happen to know why BIS_fnc_MP doesn't work in Epoch? And thank you for your answer! Link to comment Share on other sites More sharing options...
KiloSwiss Posted April 27, 2015 Report Share Posted April 27, 2015 It's disabled (function is being overriden) for security reasons. Same goes for Tonics Altis Life Mission btw. Link to comment Share on other sites More sharing options...
Nemaconz Posted April 27, 2015 Author Report Share Posted April 27, 2015 Well since there is no RE anymore, I'll try and create the sounds server side instead because I don't want them out of sync with other players, when the sounds occur everyone needs to hear them at the same time. Time to start the adventure known as a metric ass ton of trial and error. Many things are not the same as it used to be. For instance I have my own AI that I wrote for Arma 2, well I got them working for Arma 3 but what happens now is that for every client that logs onto the server, an additional AI is created, didn't used to be that way before even though the script was in the mission file. Thanks again brother, you have been very helpful. Link to comment Share on other sites More sharing options...
KiloSwiss Posted April 28, 2015 Report Share Posted April 28, 2015 Use publiVariableEventHandler clientside and publicVariable serverside to trigger sounds on all clients almost synchronized. Search this Forum for examples and read the appropriate BIS wiki pages. Separate code from being executed on clients vs server by using:if(isServer)then{ //Serverside only code };Greez Kilo "Brother" Swiss Link to comment Share on other sites More sharing options...
Nemaconz Posted April 29, 2015 Author Report Share Posted April 29, 2015 God I feel retarded, it has been awhile since I've scripted. I added the if(server)then and I'm good, no more additional AI spawning per client. I cannot believe I didn't think of that. Thanks again. Gonna see about the publiceventhandler, I've used them before but it's been awhile. I should be able to get it going, god I wish they would have just left the friggin RE in. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now