User Tag List

Results 1 to 5 of 5

Thread: Problems with OGG and Global Events?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problems with OGG and Global Events?

    Is anyone aware of Global Events behaving oddly with audio files or particularly OGG Files? I'm having a strange error and I can't figure out what the problem is.

    I have the 4 level tracks playing one after the other in sequence, 1,2,3,4 and back to 1 again. It works perfectly fine on the computer, no hassles. As soon as I put it on the Android phone, it just keeps looping track 1 and won't change track. I have tried rebuilding it several times and doing a few different things to problem solve it, but it honestly works fine on the PC then stops on the phone. Here's a quick version of the code, all global events:

    If Track Changer(Global Variable) = 1
    && Track 1 is not playing
    && Track 2 is not playing
    && Track 3 is not playing
    && Track 4 is not playing

    Then : Play Track 1

    If Track Changer = 1
    && Track 1 IS playing

    Then : Change Track Changer to 2

    Then when Track 2 is playing it changes the track to 3, etc. So the idea is when one song is playing, it changes the track changer so that as soon as it stops, the next one starts. It works fine on the PC, but not on the phone.

    Any idea's?

    EDIT
    ****

    The way I check if a track is playing is I use the 'Is a Sample not playing?' condition and then negate it, so if a sample is not not playing, then it is playing, so to speak. Perhaps Android doesn't deal with one of these conditions / events so well? It seems pretty straight forward though.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Apr 2010
    Location
    Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think there is an issue with the "is not playing" function on android.

    I also had the problem that my menu soundtrack didn't stop when you start a game. I used "if inGame music is playing > stop menu music". Didn't work though... Made a workaround, but in your case I think there is none until it's fixed except defining the length of a track in a variable and counting down :P

    I'm also using .ogg files.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply. Just as you were replying I added an update. Yes I used the 'Is a sample not playing' and then negated it to check if a sample is not playing. I'm wondering now, with your comment, if that's part of the problem. That would mean the track was never changing, because it was never succeeding in checking that condition. Hm... if that is truly the problem, which it sounds like it probably is, then it will require a work around. A counter of some sorts may not be a bad idea.

    Possibly this should also be reported as a bug if that is the case.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solved Track Changer!

    FIXED! It WAS the event 'Is a sample not playing'! For some reason that doesn't work with Fusion. I did as you suggested and created a counter, thank you very much for your helpful suggestion!

    With the counter, rather than adding '1' 60 times a second, I added '1' every '1 second' so that way the maths is a bit easier and it probably saves on system resources. So for a 3 minute song, I just check from when the counter = 180. Works perfect on the phone! And it was actually really easy to implement. It now says:

    Every 1 Second : Add 1 to Track Changer

    If TrackChanger(Global Variable) = 1
    && Only one action when event loops

    Then : Play Track 1

    If TrackChanger = 1
    && TrackChangerTimer = 60

    Then : Stop Track 1
    && Change Track Changer to 2

    Then if TrackChanger = 2, play track 2, etc...

    It involves less lines of code too so it's actually cleaner. It's probably more like what you might do in real programming too so it could be useful in that sense, as I want to pick up some more proper programming soon.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just wanted to add that my previous solution has not worked the best. Using the timer to add to the counter for some reason misbehaves. I have told it to add 1 to the counter every second, but somehow the counter and the timer are falling out of sync. The counter slowly creeps ahead of the timer, which means that songs end abruptly before they're meant to. I will attempt other work arounds. This is frustrating that the 'Is a sample not playing' doesn't work with Android.

Similar Threads

  1. Global objects in global events
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th October 2010, 12:12 PM
  2. Global events or Frame events first?
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th June 2010, 08:18 PM
  3. Group of events & global events - performance?
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 9th June 2010, 03:00 PM
  4. Global Events
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th January 2009, 02:01 AM
  5. Global Events
    By Bruto in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd November 2006, 10:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •