Page 1 of 1

How do I set audio silent on IOS?

PostPosted: Wed Aug 05, 2015 5:26 pm
by laoniustudio
Hi there,

I am exporting my project in IOS, I found set the audio silent is not work for IOS's music, just for sound, but works fine in andriod, so anyone knows how to toggle music in IOS? and also a old problem in the forums, how to make the IOS music play at the beginning without touch on the screen? thanks

Re: How do I set audio silent on IOS?

PostPosted: Wed Aug 05, 2015 7:04 pm
by Edelplastic
I think you can solve all Problems with Variables (This Functions will work at all Devices).

1. Example:
Variable "MusicMute"

Long Description:
-------------------------

Make a Group "Mute Music"
Event 1: If User press button (Touch is pressed a Object or Mouse is clicked a Object) "Silent.png" (Mute Button) + Another Condition-> Variable "MusicMute" = 0 + Trigger Once while True-> Set Variable "MusicMute" to 1 + Set the Music Silent

Event 2: If User press button (Touch is pressed a Object or Mouse is clicked a Object) "Silent.png" (Mute Button) + Another Condition-> Variable "MusicMute" = 1 + Trigger Once while True-> Set Variable "MusicMute" to 0 + Set Music not Silent

Short Description
-------------------------

Easier it is, when you do that:

Event: If User press Button + Trigger Once while True->

Subevent 1 - Variable "MusicMute" = 0 -> do silent + Set Variable "MusicMute" to 1
Subevent 2 - Variable "MusicMute" = 1 -> do not silent + Set Variable to 0

both Descriptions has the same function and you can Mute / Un-Mute your Music with one Button - If you not want a Button and you want to Mute your Music from other Reasons, you can also use another required Events to trigger the Actions (Example: If Sprite ... is visible or whatever)

-----------------------------------------------------------

Problem 2 (Start Music from beginning withouth Touch)

This you also can solve with a Variable if necessary

Variable "StartMusic"

At Start of Layout ->
Subevent 1: Variable "StartMusic" = 0 + Trigger Once while True-> Play Music from beginning
Subevent 2: Variable "StartMusic" = 1 -> leave empty ( = System do nothing --> prevents that the Music plays several times)

If the Problem resists, you need a Loader Layout, where the System preload the Music.

Re: How do I set audio silent on IOS?

PostPosted: Wed Aug 05, 2015 11:54 pm
by laoniustudio
@Edelplastic thanks, I will try

Re: How do I set audio silent on IOS?

PostPosted: Mon Aug 10, 2015 8:09 am
by laoniustudio
@Edelplastic the variable method still not works in IOS, any other ideas? thanks

Re: How do I set audio silent on IOS?

PostPosted: Tue Aug 11, 2015 6:44 am
by laoniustudio
anyone can help?