User Tag List

Results 1 to 7 of 7

Thread: acting on multiple active named active1, active2, activeX - HOW??????

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    acting on multiple active named active1, active2, activeX - HOW??????

    i believe i have the correct logic for what i want to do, but i just don't know how to implement in mmf2.

    seems like it might be similar to "pointer" in C? i need to both retrieve value from memory AND point to address space of that memory

    i would be very appreciative for any help you can provide, forum.

    i have 10 items and 10 beds

    A) saving:
    if item[X] collides bed[X]
    and
    bed[X] is empty (alterable value A of bed[X]=0)
    then
    set the item[X] in bed[X] (save the "X" of item[X] to bed[X] alterable value A)

    if bed[X] is not empty (if bed[X] alt val A=0), don't do anything to bed[X] alt val A

    B) loading:
    at start of frame, check bed[1] through bed[10] to see if it has value 0 or >0
    if 0, do nothing
    if >0, move item[X] to bed[X]

    i know how to do this conceptually but in practice i'm having trouble implementing in mmf

    i want to use fastloop and counter

    so i have counter named "loopcounter" set to 1 and loop named "loading"
    i run loop "loading" 10 times
    on loop "loading", check bed[1]=1, if bed[1]=1, then place item[1] at bed[1]
    on loop "loading", check bed[1]=2, if bed[1]=2, then place item[2] at bed[1]
    ...
    on loop "loading", check bed[10]=10, if bed[10]=10, then place item[10] at bed[10]
    on loop "loading", add to loopcounter +1

    my issue is that i don't know how to interface with MMF so that I can use expression editor to write "bed[X]". i only know how to address one object i.e. bed1, bed2, bed3. it becomes many lines very quickly :P

    ------
    other related problem:

    i'm using numbers array and numbers counter... this one makes absolutely no sense to me. very frustrating.

    thank you for your help, forum.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can use the Spread Value action to give each active object a unique value starting at the value you want. You can then use the ForEach obejct to loop through and save each one. You will also want to save how many you saved. Then you can later load it again by crating the correct number of objects and using spread value, then using ForEach to loop through them again. The spread value should, in both cases, be used as the ID to differentiate different saved objects in the INI.

    As for pointers, the closes MMF2 has to that is that every object has a Fixed Value, but you should not use this for identifying them across saves because they can change unpredictably.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LB View Post
    You can use the Spread Value action to give each active object a unique value starting at the value you want. You can then use the ForEach obejct to loop through and save each one. You will also want to save how many you saved. Then you can later load it again by crating the correct number of objects and using spread value, then using ForEach to loop through them again. The spread value should, in both cases, be used as the ID to differentiate different saved objects in the INI.
    but isn't 'spread' only for multiple duplicate active obj? i have 10 active object named item1, item2, item3, etc. i have 10 active object named bed1, bed2, bed3, etc.

    each active is unique and is placed in a unique XY position in the frame. they are not the same object.

    let me ask you a new question please, LB:

    if i just make one bed active, named bed, and place it 10 times in 10 different places, and then i run spread ID, will it spread ID in the same pattern each time?
    so lets imagine grid of beds, 2 row and 5 column
    start of frame, spread ID to alt val A of bed
    will top left bed always be (0 or 1 i don't know how index starts)? or will it be random?

    i must learn ForEach today.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Spread value is guaranteed to give the oldest objects the highest values and the newest objects the lowest values, and the values will always be the same if you never create or destroy between spreading. You can always, after spreading from 1, set the object's Alterable Value to NObjects-Alterable Value to get the oldest object at 0 and the newest object at NObjects-1
    Working as fast as I can on Fusion 3

  5. #5
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    On my website I have a Node Example that shows exactly what LB was saying.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i believe i understand what to do now. thank you very much for your help, i now understand spread.

    and it is beautiful! I LOVE MMF!!!!!

  7. #7
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)
    Another thing you might want to look at is "Qualifiers". These are properties which can be assigned to groups of different objects and can allow you to work with them as a whole.

Similar Threads

  1. Attaching multiple active objects
    By artician in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd February 2009, 12:56 AM
  2. Multiple Angles in Active Objects?
    By Stephen in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th October 2008, 03:38 PM
  3. Two of my active objects aren't acting properly.
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th August 2007, 04:40 AM
  4. Named Flags for Active Objects?
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd May 2007, 08:59 PM
  5. multiple active points?
    By Zomby138 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 24th September 2006, 07:43 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
  •