User Tag List

Results 1 to 7 of 7

Thread: How to get the Android Runtime music playlist in semi-random order??

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get the Android Runtime music playlist in semi-random order??

    Hi clickers,

    Does anyone have an idea how I would be able to get a random music playlist that would play over all frames...


    Here's what I need it to do exactly...

    Track1 should always be first.
    Track2 and Track3 should be randomly selected but then followed by the other.

    So in conclusion I need the songs to always play in 1 of 2 random patterns...

    Pattern 1:
    track 1, track 2, track 3, then loop this order...

    Pattern 2:
    track 1, track 3, track 2, then loop this order...



    CURRENTLY, for the time being... I have two .ogg files with the tracks placed in order within the ogg file... all 3 songs in both patterns and I'm just using RRandom (1, 2) to select ogg file 1 or 2:

    ogg file 1:
    track 1, track 2, track 3 (then I have it loop 100x)

    ogg file 2:
    track 1, track 3, track 2 (then I have it loop 100x)

    this currently gives me the order that I need but since I have two LARGE ogg files... instead of 3 single track files... I am finding my .APK file size to be 51MB and I know I can reduce it to about 43MB if I can find a solution for the above mentioned question...

    Am I looking too much into this and 7MB file size shouldn't matter anyway?

    If you've released an Android App before and have experience with this then your feedback would be much appreciated. Thanks guys!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can do that with global events
    Here is an example:
    http://community.clickteam.com/threads/87232-Global-Events-Example

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Bree's Avatar
    Join Date
    May 2014
    Posts
    317
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hello!

    I did something similar in my game, I hope this helps a little. So the way I did it is make 3 groups.

    Group 1 was my Randomizer

    Group 2 was Playlist 1

    Group 3 was Playlist 2

    Randomizer Group had something like this in it:

    On group activation, or other trigger set Global Value to Rrandom (1,2)
    Global Value = 1 Activate Group Playlist 1
    Global Value = 2 Activate Group Playlist 2
    Deactivate group Randomizer


    Then in my Playlist Group I did this:

    Play Song1
    Once Song1 is finished playing play Song2
    Once Song2 if finished playing play Song 3
    One Song 3 is finished activate Group Randomizer and Deactivate Group Playlist.

    Then it repeats with the Playlist Group 2

    Maybe there is a better way to do it but hopefully gives you some ideas! :-)

    After I typed this Sparckman replied, so he probably has a better example

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replay Sparckman and Beejers! Appreciate it.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Beejers! I really like your idea behind the playlist. I created two playlists in the Global Events... but for my samples... I do not see "Sample has just finished playing?".... where is that located, Please? Thanks!

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Bree's Avatar
    Join Date
    May 2014
    Posts
    317
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hiya! So Looks like I got mixed up on that part.

    So for sample what I did is say under the Sound -> Samples section is choose is specific sample not playing or you can be more generic and say is sample not playing. Then from there say Play the next song

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks!

Similar Threads

  1. Spreading values in a random order across an array
    By Ibis in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th September 2012, 04:34 AM
  2. Will android runtime support changing of semi translucency of actives?
    By BrashMonkey in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 23rd November 2011, 07:18 AM
  3. Modify Order at Runtime (move to front, etc)
    By rubes in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 31st May 2011, 09:41 PM
  4. Playlist help
    By secoffnz in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th March 2008, 11:30 PM
  5. changing order of layers at runtime?
    By integrality in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 2nd July 2006, 07:33 AM

Posting Permissions

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