How do I set audio silent on IOS?

Get help using Construct 2

Post » Wed Aug 05, 2015 5:26 pm

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
B
11
S
3
Posts: 172
Reputation: 1,178

Post » Wed Aug 05, 2015 7:04 pm

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.
B
8
S
2
Posts: 53
Reputation: 687

Post » Wed Aug 05, 2015 11:54 pm

@Edelplastic thanks, I will try
B
11
S
3
Posts: 172
Reputation: 1,178

Post » Mon Aug 10, 2015 8:09 am

@Edelplastic the variable method still not works in IOS, any other ideas? thanks
B
11
S
3
Posts: 172
Reputation: 1,178

Post » Tue Aug 11, 2015 6:44 am

anyone can help?
B
11
S
3
Posts: 172
Reputation: 1,178


Return to How do I....?

Who is online

Users browsing this forum: dereck28 and 20 guests