User Tag List

Results 1 to 8 of 8

Thread: Apply values to object by ID

  1. #1
    Clicker Fusion 2.5Android Export Module

    Join Date
    Feb 2014
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apply values to object by ID

    I give all enemy objects and ID with spread, stored at the enemy's value A. I have a long string containing position values for each enemy in the format ID;X;Y;, i.e. "1;10;15;2;25;25;4;30;10;3;5;5;".
    I know how to loop through the values from the string with the string parser, but how do I assign each value to the correct enemy?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need the correct enemy selected either have the enemy itself in foreach loop use his ID to extract the element.

    You would use the ID*2+1 for x and ID*2+2 for y if there is 2 elements for every enemy (you need to take into account string parser is 1 based)

  3. #3
    Clicker Fusion 2.5Android Export Module

    Join Date
    Feb 2014
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know how to do it in theory, if it would have been a normal programming language i would have solved this in a minute. What I need help with is how to do it in Fusion.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well i dont know really with which part you have a problem with, but here is a quick example:

    https://dl.dropboxusercontent.com/u/...c1/Example.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    939
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    yeah you don't need a loop for this, just straightforward.. because each active will use it's own value in an expression applied to itself
    noloop.mfa (edit: yeah i could have just checked the previous example)

  6. #6
    Clicker Fusion 2.5Android Export Module

    Join Date
    Feb 2014
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Skyhunter View Post
    Well i dont know really with which part you have a problem with, but here is a quick example:

    https://dl.dropboxusercontent.com/u/...c1/Example.mfa
    Well no, that's not what I asked for. You forgot the ID part in the string: ID;X;Y;, i.e. "1;10;15;2;25;25;4;30;10;3;5;5;".
    1, 2, 4 and 3 is the ID of 4 of the objects.

    "1;10;15;": X = 10, Y = 15 of object with ID 1
    "2;25;25;": X = 25, Y = 25 of object with ID 2
    "4;30;10;": X = 30, Y = 10 of object with ID 4
    "3;5;5;": X = 5, Y = 5 of object with ID 3

    Note: as you can see, the objects can come in random order.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would do that a bit differently then, by running a loop through elements, divided by number of elements for each object.
    Then you can select object or objects to give them the values...

    https://dl.dropboxusercontent.com/u/...1/Example2.mfa

    Though this is not that much different from the first example i sent you, you will get the same overall results...

  8. #8
    Clicker Fusion 2.5Android Export Module

    Join Date
    Feb 2014
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, that's pretty obvious now when I see it. Thanks!

Similar Threads

  1. Apply shader to specific object(s)? Or another way to do this?
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th September 2013, 02:23 PM
  2. apply IC registry changes without restarting
    By popro in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 20th October 2009, 02:16 PM
  3. How do I apply an multiple movement?
    By Aqib in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th April 2008, 11:09 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
  •