User Tag List

Results 1 to 2 of 2

Thread: A little help for the Spread value Masters. About set ID for each object

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face A little help for the Spread value Masters. About set ID for each object

    Hello again my friends, how are you? I'm with a little problem in my MFA, can someone help me?

    -I have 5 Enemies (actives). Enemy0, Enemy1, Enemy2, Enemy3 and EnemyR, with the same qualifier (Enemies).
    -Each enemy have a bodyCollisionMask (another active).
    -Each enemy have a Alterable Value A called "ID" that I spread in a loop.
    -Each bodyCollisionMask have a Alterable Value A called "ID" that I spread in a loop too.

    When the frame starts, I create how many enemies I want (but never the EnemyR).
    Just before, I run a loop that create the bodyCollisionMask how many times I have the Enemies quantity. (If I create 8 enemies, the loop create 8 bodyCollisionMask, for example).
    After that, I run a loop that spread value of "ID" to match with every bodyCollisionMask and Enemies.
    Then every bodyCollisionMask will be on the place of the same ID of the Enemy using a Aways condition.


    Well, this is working perfect. BUTTT, my problem is: The EnemyR.

    I want that Every Start of Frame, I pick one of the created Enemy and replace to the EnemyR, positioning this EnemyR on the same position of the replaced Enemy and get it "ID" to make the same bodyCollisionMask be on the place of the EnemyR.

    I'm trying to do this, seens to work at the first look, but if you check the "ID" of the Enemy and the bodyCollisionMask using the Mouse Over, the counter will show that it's different.

    ====

    Sorry to the confusing text, but if you open the MFA, you will understand.

    Before enable the EnemyR creation events, put the mouse over every Enemy and your bodyCollisionMask, you will check ON THE COUNTER that each Enemy and Mask are in the same place, together.

    BUT, when you enable the EnemyR creation Events, you will check with the mouse over that the bodyCollisionMask are not the same anymore (in rare luck times it will be correct)...

    If someone can help me, I will thank a lot...Best regards



    Check the MFA below:
    EnemiesByID.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I got it!

    I replaced the action:
    • Aways
    • ID of BodyCollisionMask = ID of Enemy
    >>> Set position of BodyCollisionMask at Enemies Qualifier.

    To:
    • Aways
    >>Start foreach loop "setColMask" on BodyCollisionMask

    • On Each loop "setColMask"
    • ID of Enemy = ID of BodyCollisionMask
    >>> Set position of BodyCollisionMask at Enemies Qualifier.

    Worked like a charm

    But, if someone knows a better solution, better otimized than foreach for example...

    Best regards

Similar Threads

  1. Unique alterable value of the same object without spread value
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 5
    Last Post: 4th February 2015, 03:09 PM
  2. Spread value on creating object (BUG?)
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th April 2013, 05:28 PM
  3. Spread value and object selection, part II
    By gum in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 19th September 2007, 06:26 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
  •