User Tag List

Results 1 to 7 of 7

Thread: Create objects at random but not overlapping?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create objects at random but not overlapping?

    Im having a hard time trying to work this out, I want to create lots of actives at runtime, and position them randomly BUT i dont want any to overlap each other?

    Anyone know how this maybe done (using standard extensions if possible)

    Thanks
    Andy

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS 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)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you position the object, add another condition to the event that is a negated "object is overlapping other object". This way, it only position the object at a place where it isn't overlapping another object.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats what I though but i position the object in the same event that creates it, so surely if i put the condition in that event then its tryingt o check for overlap before its even been created? (either way it doesnt seem to work)

    Thanks
    Andy

  4. #4
    Clicker

    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,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hi Gibbon. Look at my Random Stars Example on my website.

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

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Nivram, thats very similer to how I am currently doing it, but if you increase your 40 to 400 then quite a few stars overlap, the issue is I dont want any overlapping each other.

    Andy

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Create an active to act as an invisible cursor/sensor; make it the same size as the actives you want to create. Randomly position the cursor/sensor and check that for negated overlaps with the other actives.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export Module
    ximo's Avatar
    Join Date
    Jul 2013
    Location
    Spain
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

Similar Threads

  1. Random Chunk Generator using "Create New Objects"?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th August 2013, 12:42 PM
  2. Create random objects
    By Captain_Harris in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th August 2012, 06:28 PM
  3. Noob on board... how to create random objects
    By rhodestown in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th December 2008, 09:53 PM
  4. Help! Objects Overlapping
    By Eliyahu in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th February 2008, 05:20 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
  •