User Tag List

Results 1 to 8 of 8

Thread: Trying to get enimes to randomly spawn...

  1. #1
    Clicker Fusion 2.5
    AM_Games's Avatar
    Join Date
    Oct 2017
    Location
    40 miles west of Chicago, IL.
    Posts
    68
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Trying to get enimes to randomly spawn...

    ...kind of like the skeletons in Ghosts 'n Goblins.
    I've tried the hot collision, where you overlap an active and an enemy will spawn but that's not what I want.

    If anyone has ever played Ghosts 'n Goblins where the skeletons rise up from the ground and run at you...THAT'S what I'm looking for.

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2016
    Posts
    40
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    So you want to make random spawn of enemies in platform game, yep?
    "I've tried the hot collision, where you overlap an active and an enemy will spawn but that's not what I want."
    So how it should looks like?

  3. #3
    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)
    An easy way might be to have an invisible active move across the top of the screen. You could then have that active shoot another invisible active, at random intervals, downwards. When that active collides with the background, create the enemy.

  4. #4
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Something like:

    - Every random(300)+50
    =create enemy at 0,0
    =set x position of enemy to random(Frame Width)

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    644
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Yeah, PBarwick's solution will work.

    So it supports variable (grid-based) heights, I expanded on it a little. This should give you some ideas to work with:

    zombie spawner.mfa


    Caesar's solution will do well too, and support slopes; but to have precise spawning on those slopes (default clickteam movements tend to be buggy and stick in obstacles) you'd need to give your spawners a custom fast-loop movement, which is a bit more in-depth.

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    644
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Here's a tweak on my original example that uses fastloops to hitscan the spawner objects to the top of any obstacle, even slopes.

    It's a bit more performance expensive but it shouldn't be a problem unless you're spawning large multiples of enemies at a time.

    zombie spawner_2.mfa

  7. #7
    Clicker Fusion 2.5
    AM_Games's Avatar
    Join Date
    Oct 2017
    Location
    40 miles west of Chicago, IL.
    Posts
    68
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I kind of like that.

  8. #8
    Clicker Fusion 2.5
    AM_Games's Avatar
    Join Date
    Oct 2017
    Location
    40 miles west of Chicago, IL.
    Posts
    68
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Caesar View Post
    An easy way might be to have an invisible active move across the top of the screen. You could then have that active shoot another invisible active, at random intervals, downwards. When that active collides with the background, create the enemy.
    This worked perfectly!!!

Similar Threads

  1. Replies: 3
    Last Post: 27th December 2016, 10:05 AM
  2. Replies: 3
    Last Post: 21st August 2016, 07:55 AM
  3. Replies: 1
    Last Post: 22nd March 2016, 12:11 PM
  4. Re-Spawn
    By Mikey in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 21st May 2010, 09:46 AM
  5. How do I randomly spawn weapons?
    By Caesar in forum Lacewing
    Replies: 4
    Last Post: 10th April 2009, 10:36 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
  •