User Tag List

Results 1 to 5 of 5

Thread: Creating a Single Instance of an object in a fastloop

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a Single Instance of an object in a fastloop

    I have a game where when you click on a unit it shows all the tiles they can possibly move to with tile highlight active objects. It requires a fastloop so that the tile highlights will all display instantly. Problem is, when I add the fastloop, it begins creating multiple tile highlight objects on the same tiles. Where there should be only 14 present for example, I get 98! How do I make a fastloop with multiple iterations only create one object?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Compair to the FastLoops Itteration Index?
    Example:

    + On loop A
    + Loop A Index = 1
    -> Create Object

    This is way too easy a solution and probably isnt the solution to your problem, but its the way i understand it.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    ForEach could be better, actually(, if the tiles are objects). It is actually faster than a fastloop anyway, so it's better for looping through objects...

    The first person to get the reference wins a cookie.

  4. #4
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately the check to see if the loop index is equal to 1 didn't work in the various methods I tried. I also tried swapping it to a ForEach loop and it broke it.

    Edit: I got it to stop doing it by turning on a flag for the tile highlight creation objects and checking for it even though they're supposed to be destroyed after they make the tile highlight objects.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Corlen View Post
    Unfortunately the check to see if the loop index is equal to 1 didn't work in the various methods I tried. I also tried swapping it to a ForEach loop and it broke it.

    Edit: I got it to stop doing it by turning on a flag for the tile highlight creation objects and checking for it even though they're supposed to be destroyed after they make the tile highlight objects.
    You might have to modify it a little if you use a ForEach loop. If you give us an example file (a stripped-down version of the file you are working on that just has the issue), we might be able to help you more.

Similar Threads

  1. How to delete single instance of an object
    By liquiddil in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th October 2013, 02:04 AM
  2. Creating objects with a single click
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th January 2013, 05:42 AM
  3. Clickteam Movement Controller only single instance?
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 18th November 2011, 01:00 PM
  4. Affecting only a single object instance
    By CrowbarSka in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd January 2010, 02:35 PM
  5. Limit MMF2 to a single instance...
    By Simon in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 11th August 2006, 02:48 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
  •