User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 28

Thread: Fitting randomazation

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fitting randomazation

    If the title doesn't make sense, then this will:

    Random Fitting.jpg

    The pieces of piping (The waterway) were meant to fit together like pieces of a jigsaw puzzle.

    Now, to provide a fun puzzle game, I am having the animation randomize itself using Random(9)+12.

    This all works fine, but some of the pieces overlap and some of them don't even touch.

    From previous experience, I'm sure that finding a solution won't be easy, but I'm up to the challenge.

    I have been experimenting with hotspots and action points and things like that, but to no avail have I reached success, so I ask the community to help me. x2

    Thank you in advance!!!

    Logan

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    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)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    XStar - Here are a few ideas that might help:
    1. Make sure all your pieces use the same size graphic, eg 100x100, even if they have empty space/transparent pixels
    2. Make sure all the pieces line up correctly on a grid of the same size as the graphic. Use a graphics program like Photoshop or Paint Shop Pro or Gimp to check this
    3. Make sure all your pieces have the same hot spot position, eg 0,0 for top left

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2 and 3 and checked off... Now in 6.7 seconds, 1 will be done too.

    OK, all three done! Now the ones that are similar have begun to fit together, but the corner pieces are still all over the place.

    Resize.jpg

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA 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)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you follow what AyreGuitar said that should solve your problem. I'd recommend double checking that you completed that for the corner pieces. Are you sure you changed the hot spots and not the action points?

    Where'd you get that tileset btw? It looks cool

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found it on a free spriters site, can't remember what in the world it was... Anyhow, it was donated by anonymous, so I can't find an author.

    I did exactly as he said, changing hot spot not action points... Perhaps I'll just try a method of repositioning? Left edge automatically moves to right edge?

    Certainly that must be possible! Is it?

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK good, I think I'm almost there, along with AyreGuitar's advice, I have almost gotten the pieces to refit themselves automatically.

    However I ran into some trouble...

    I am testing for the left edge greater than right edge, then move in the direction that would fit it until it's equal.

    But, I tried doing this with a group and they all moved! Do I have to test each individual one for edges, or is there a way I can do them all at once?

    Thanks so much for your help so far!!!

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    rubes's Avatar
    Join Date
    May 2011
    Posts
    364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will need to spread a value to the pieces in an alt value, then do a fast loop to cycle through the ID's to do your checking. Two of my biggest earliest challenges in MMF were this cycling through of ID's, and that newly created items with an always spread function would take on ID 0. Now that I understand these, I'm able to use it to my advantage.

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, got the spreading, got the loop starting, but now, do I just check it normally on the loop, or do I have to check for a spread value or something?

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    rubes's Avatar
    Join Date
    May 2011
    Posts
    364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use an On Loop command something like

    On Loop "Check ID of Active"
    +alterable value a of active (which should be the ID)=Loop Index of "Check ID of Active" do something in the event editor

    If you set the number of loops to the Count of Active Items, and you are spreading the values in alterable A (I would rename it to ID), then this will cycle through each item. You will probably want to insert another check, as well. So if I wanted to see which active was at y position of 0, i would do:

    On Loop "Check ID of Active"
    +alterable value a of active (which should be the ID)=Loop Index of "Check ID of Active" do something in the event editor
    + Y position of active=0
    and in the event editor, I may choose to change direction of the active to show a different image, or whatever.

    I'm not at my pc w/mmf on it, so that's the best i can explain

  10. #10
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    XStar's Avatar
    Join Date
    Feb 2012
    Location
    Winchester, VA
    Posts
    1,165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, so this is what I did:

    Did I do it right.jpg

    So now it should automatically reposition itself into the right place to fit? But it's not... Did I miss something or what?

    At first I thought that it was just doing it once, but the loop goes on the amount that there is, so it should work... But I'm not sure. I don't usually have to do things like this!

    It's my first experience with this type of thing, but I'm glad that you are able to help me!

    So, what did I do wrong?

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Fitting text into a string object.
    By Filip in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th November 2013, 02:57 PM
  2. Fitting this script to my needs
    By Hydra in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th June 2012, 03:35 AM
  3. Replies: 0
    Last Post: 13th October 2009, 12:58 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
  •