User Tag List

Results 1 to 6 of 6

Thread: Create random objects

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Captain_Harris's Avatar
    Join Date
    Aug 2011
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Create random objects

    how can i create a random object with the timer ?

    for example:
    i have four objects ( trees )
    i want create every 2 second a random tree

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can have a counter object that creates a tree depending on its value. For example:

    Every 2 seconds set TreeCounter to Random(5)
    If TreeCounter = 1 then create Tree1
    If TreeCounter = 2 then create Tree2
    etc.
    If TreeCounter > 0 set TreeCounter to 0

    Random(5) will pick a number 0 through 4 randomly, and the next events are possible outcomes. The last event is to end the tree creation.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Captain_Harris's Avatar
    Join Date
    Aug 2011
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah .... Ok. Thank You

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Captain_Harris's Avatar
    Join Date
    Aug 2011
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is one problem. the counter creates trees all 2 seconds only, when he's not on 0. so always if the counter has the value 0, he doesn't create a tree.

  5. #5
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That's because the example above will pick 1 random # from a range of 5 but this includes 0. That is 0,1,2,3, or 4.

    So if you want a # from 1 to 5, you'd have to change Random(5) to Random (5)+1.

    It's kind of weird but you get used to it.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Captain_Harris's Avatar
    Join Date
    Aug 2011
    Posts
    336
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That works perfect Thanks

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. created objects create objects and destroy both.
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th September 2012, 08:37 PM
  3. Is it possible to truly create/delete objects...
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 28
    Last Post: 10th May 2010, 10:40 PM
  4. 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
  5. Create a random object from set
    By invicticide in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th December 2007, 07:12 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
  •