User Tag List

Results 1 to 6 of 6

Thread: Spawning Random Objects

  1. #1
    No Products Registered

    Join Date
    Oct 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spawning Random Objects

    Hi,

    I just finished the Chocobreak tutorial (in the Games Factory 2, trying that out first) and am working on improving it with improved controls, power ups and so forth. I've figured out how to create new objects so I can spawn power ups when the bricks are broken - the problem is, I don't want them to spawn every time.

    So my question is:

    • How do you create objects that spawn from a random value?



    Currently it's "If Ball Golden has a collision with Milk > Create new Champagne Glass"

    But I would prefer that it somehow checked for a random number between say 1 and 4, and if it's a 2, it spawns a champagne glass, if it's a 3, it spawns a muffin, and if it's a 1 or a 4 it spawns nothing. How do you do that in the Games Factory? It's a pretty fundamental question for game dev and I've skimmed some beginner and intermediate tutorials with no luck. All the tutorials I've seen just use timers, but I want it based on random chance, pure chance.

    Thanks, this is my first post in this forum, liking the product so far. Looking forward to meeting some of you on here.
    Stu

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can use the built-in condition for that:
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Oct 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now that you point it out it's blindingly obvious! Thanks!

  4. #4
    No Products Registered

    Join Date
    Oct 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just trying to get my head around their way of logic, so can you help clarify for me exactly what it means and how to use it?

    For example, it comes up with 2 windows. The first says, "Enter the chances" and then "Enter the total number of chances".

    So say I said, "Enter the chances = 1" and "Total chances = 4", would that mean there was a 1 in 4 chance of the event occurring? Is that how it works?

    Thanks

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that is how it works.

  6. #6
    No Products Registered

    Join Date
    Oct 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks All working good now.

Similar Threads

  1. Random object spawning random y set x
    By Armiferamortalis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd December 2013, 11:47 AM
  2. (mfa included) random spawning in would be dress-up game
    By Aloan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th July 2013, 03:41 PM
  3. Random spawning example
    By happygreenfrog in forum File Archive
    Replies: 3
    Last Post: 6th May 2012, 03:03 PM
  4. Random Spawning After Destruction?
    By Bittergamer1886 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 1st May 2012, 05:06 PM
  5. Random object spawning?
    By Zambaku in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 25th July 2009, 04:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •