Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Recommended Posts

I want to add a Radio on action  to vehicles and radio objects in my mission. When the action is triggered i want music to play randomly selected from a list and then when Radio off is triggered i want it to stop anyone able to give me a bit of script that will allow me to do this?

Share this post


Link to post
Share on other sites

To give an idea i want my action to do this 

radio1 addAction [ "Radio On", {remoteExec "radio.sqf";}];

 

ps really new to scripting correct me if i typed it wrong...

Share this post


Link to post
Share on other sites
1 hour ago, Brandon Steinlein said:

radio1 addAction [ "Radio On", {remoteExec "radio.sqf";}];

 

[radio1,["Radio On","radio.sqf"]] remoteExec ["addAction",0];

Share this post


Link to post
Share on other sites

Thanks i also need to know what to put into the radio.sqf script though... i want to use the random function to select a track at random and keep looping and selecting tracks at random until the radio is turned off.... 

This is what i have so far:

 _sounds = selectRandom ["t1","t2","t3","t4","t5"];

 

what i am missing though is how do i get the object to play and loop these....

Share this post


Link to post
Share on other sites
29 minutes ago, Brandon Steinlein said:

Thanks i also need to know what to put into the radio.sqf script though... i want to use the random function to select a track at random and keep looping and selecting tracks at random until the radio is turned off.... 

This is what i have so far:

 _sounds = selectRandom ["t1","t2","t3","t4","t5"];

 

what i am missing though is how do i get the object to play and loop these....

I got just the thing. PM me your steam.

Share this post


Link to post
Share on other sites

There is a lot to explain how to do this. This Youtuber tutorial will help.

 

 

Share this post


Link to post
Share on other sites

×