Trying to get enimes to randomly spawn...

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • ...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.

  • 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?

  • 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.

  • Something like:

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

    SUPER MEGA BEST CAT ADVENTURES Please login to see this link. and Please login to see this link. live now!

  • 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:

    Please login to see this attachment.


    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.

    Best person at writing incomprehensible posts. Edits are a regularity.

    Edited 2 times, last by casleziro (January 28, 2018 at 10:01 PM).

  • 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.

    Please login to see this attachment.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • 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!!!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!