Spawns

0 favourites
  • 7 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Hi again!

    I have multiple objects that spawn different bullets.

    I would like to have the objects spawn a different bullet at random times, but I also wish to speed up the spawn rate as the score increases.

    Here's an example of what I have now: Spawn.capx

    The bullets are in a family so the objects spawn the family & I'm glad that it picks a random bullet to spawn.

    However, putting the spawn-objects in a family doesn't work the way I want it to because they will all spawn at a random time together.

    Please help me understand how to make it work! I am a noob that really wants to learn!

    Many thanks!

  • ... still waiting for help! ;)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your link is outdated, if I can see a .capx I'll be happy to help out.

  • That's weird... does Dropbox change links frequently? Well, I copied & pasted the link again. Hope it works now!

  • This capx

    Using the random expression in a condition will change the value every tick, when what you want is a random interval between spawns.

    A possible implementation is using a global variable to keep the value for the interval.

    And each time this interval is done, spawn an object and set a new value for the interval. The value is a mix of random and an operation according/depending on the score.

    The expression here is just to show how you can do.

    It's not a long term viable solution as at some point the value of the score might end giving 0 intervals (which then should spawn each tick).

    Anyway, hope this answers your question.

  • That's weird... does Dropbox change links frequently? Well, I copied & pasted the link again. Hope it works now!

    Great, works now. And as promised, here's my attempt:

    Link - Dropbox

  • Thank you both for helping me out! Time to study your methods!

    I get confused easily when there's so many global variables, hehe.

    I really appreciate the explanations here and in the .capx file! Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)