User Tag List

Results 1 to 5 of 5

Thread: I need an alternative way to iterate through objects for J2ME

  1. #1
    Clicker Fusion 2.5 DeveloperInstall Creator ProFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2016
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need an alternative way to iterate through objects for J2ME

    The J2ME export does not have the "iterate through objects" thing available. This means that I will somehow need to assign to every object a number or something like that. Is there a tutorial on how to do this? Has anyone solved this problem before?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Not having the "foreach" loop?

    You could perhaps try the old "fastloop + spread value" way?

    spread value 0 in all your instances --> this will give an increasing unique number to all of your instances starting from 0

    then fire a fastloop Nobjects times

    on loop "iterate"
    +ID of object = loopindex("iterate")
    >>> do stuff for this object

  3. #3
    Clicker Fusion 2.5 DeveloperInstall Creator ProFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2016
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, I see. But what if I'd like to check if one "Goomba" flattened another "Goomba"? Should I let all Goombas have 2 qualifiers and then check for all colliding Goombas, spread value 0 to all of them and then do a nested loop to check if Qualifier A.Y is bigger than Qualifier B.Y?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    You can check collisions between same instances of objects,
    but if you need to check which is the "higher" one,
    you could do some trickery with the event sheet,
    or use an additional "external" detector

    here's an example with the event sheet trickery

    pick_higher_collision.mfa

    The "lower" diamond among the two colliding will be destroyed on collision

    Would probably mess when (very rare circumstance?) more than two elements collide at the same time

  5. #5
    Clicker Fusion 2.5 DeveloperInstall Creator ProFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Sep 2016
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you

Similar Threads

  1. How does the "Iterate Array" action in the Named Variable object work?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 7th December 2011, 04:31 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
  •