User Tag List

Results 1 to 5 of 5

Thread: Creating dynamic objects (fast loop)

  1. #1
    Clicker Fusion 2.5 (Steam)
    Junix's Avatar
    Join Date
    Jul 2017
    Location
    Rio de Janeiro - Brazil
    Posts
    6
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Creating dynamic objects (fast loop)

    I'm using yellow and grey blocks (active object) to show how high or low is the game volume and using the left and right arrows, you can change this. I'm distributing this in 10 blocks in total, like this:
    1.png

    In this case the global variable (sound_volume) is 60. I made this test to increase or decrease the volume:
    2.png

    The idea of the loop is run N times depending of sound_volume value.

    Example:
    Code:
       sound_volume = 60
       sound_bar_full loop times (sound_volume / 10) = 6 (create 6 yellow blocks)
       sound_bar_empty loop times (10 - (sound_volume / 10)) = 4 (create 4 grey blocks)
    On loop sound_bar_full I create (N loop times) the yellow block object on screen:
    3.png

    And set position of X:
    4.png

    On loop sound_bar_empty I create (N loop times) the grey object:
    5.png


    And also set the position of X:
    6.png

    So as you can see, when you press “left” key, I destroy all objects using a qualifier and remake the images running both loops, but I have two problems here:
    1- When I press the arrows key, the objects created is not only one, it creates a dozen of blocks;
    7.png

    2- When the volume comes to 100, the entire bar disappear (destroyed).

    So, that's it.

    Thanks for reading.

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Diogen's Avatar
    Join Date
    Feb 2016
    Location
    Zaporizhzhya, Ukraine
    Posts
    47
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think it will be easier

    bar.jpg
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,337
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Junix , destroying objects and starting a loop that's creating objects in the same event may mess up the object selection.
    Instead, have two events with the same conditions, but the first event destroys the objects, and the second event starts the loop. I don't know if that's the only issue here, but it's worth a try.

  4. #4
    Clicker Fusion 2.5 (Steam)
    Junix's Avatar
    Join Date
    Jul 2017
    Location
    Rio de Janeiro - Brazil
    Posts
    6
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Diogen, it works perfectly.
    Thank you, man!

  5. #5
    Clicker Fusion 2.5 (Steam)
    Junix's Avatar
    Join Date
    Jul 2017
    Location
    Rio de Janeiro - Brazil
    Posts
    6
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    @Popcorn , you're right as you can see in the Diogen example.

    My problem was solved, thank you guys.

Similar Threads

  1. Help with fast loops creating objects
    By abcaptain in forum Fusion 2.5
    Replies: 1
    Last Post: 5th February 2017, 10:32 PM
  2. Creating objects by name in fast loop?
    By Cybert9 in forum Fusion 2.5
    Replies: 3
    Last Post: 2nd January 2016, 05:00 PM
  3. Timer and fast loop on objects
    By Allrounder in forum Fusion 2.5
    Replies: 7
    Last Post: 28th January 2014, 08:37 PM
  4. Picking Single Objects and Fast Loop Trouble
    By Kid_Roleplay in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 9th September 2009, 01:25 AM
  5. (Help) creating objects durring a fast loop and...
    By nightofgrim in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th July 2006, 06:46 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
  •