mekonbekon's Recent Forum Activity

  • This example spawns a random object every X seconds whilst the mouse is down:

    dropbox.com/s/tym974m11mnkba3/spawnRandomNoPattern.c3p

    This example spawns a predefined pattern of objects:

    dropbox.com/s/pb0e095cb3bgqha/spawnPattern.c3p

    If you're going to have lots of different spawn patterns I'd use an array or dictionary rather than string variables to store the patterns.

    This example generates a new random pattern each time you click the mouse:

    dropbox.com/s/72dodyqh90hq4cu/randomSpawnPattern.c3p

  • No problem :-)

    int(random(maxSpriteNo))+1 returns a random number of sprites to spawn and works as follows:

    -"maxSpriteNo" is the maximum number of sprites you want to spawn.

    -"random(maxSpriteNo)" generates a random float between 0 and maxSpriteNo, not including maxSpriteNo.

    -"int(random(maxSpriteNo)" removes any numbers after the decimal point of the randomly generated float, returning just the whole number - it's important to note that "int" doesn't round up, so 0.999999 will still return 0.

    -By this stage we will have whole number between 0 and maxSpriteNo-1, so we add 1 to provide a number between 1 and maxSpriteNo.

  • No worries, here's an example to show it in practice:

    dropbox.com/s/fpgqh7g9w87hndy/randomSpawn.c3p

  • + Condition: System: If variable = 0

    + Condition: System: Trigger Once

    ++ Sub-condition: System: Repeat int(random(yourNumber))+1 times

    -> Action: System: Create object sprite on layer 0 at (random(maxXvalue), random(maxYvalue))

  • So it would be:

    + System: If variable = 0

    + System: Trigger Once

    ++ System: Repeat int(random(yourNumber))+1 times

    -> System: Create object sprite on layer 0 at (random(maxXvalue), random(maxYvalue))

  • Also add a trigger once to that first condition to stop it continually firing.

  • + System: If variable = 0

    + System: Repeat int(random(yourNumber))+1 times

    -> System: Create object sprite on layer 0 at (random(maxXvalue), random(maxYvalue))

  • Functions no longer show as an object - you can add a function by right-clicking on an empty space of the event sheet and selecting "Add function".

  • You could use a 3D array and save the second number on the z axis, or concatenate the numbers as a string and then use the tokenAt expression to pick each number.

  • Is it theoretically possible for layouts to be configured as wrapped around cylinders or toroids instead of on a flat plane (which would allow for true seamless wrapping) or is this fundamentally incompatible with the underlying architecture that C3 is built on?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Since the last Beta update my local saves have gone from taking a few seconds to a few minutes to complete. The first few saves after opening a project are quick but after that the slowness sets in and the only way to speed them up is to reload Construct.

    My project size is fairly small (<1.4MB). I'm using Win10, PC, Chrome v80.

    Has anyone else experienced this and if so is there a simple fix?

  • I think that's pretty much the size of it - if the game has been loaded once it doesn't need to be reloaded, even if you refresh the page. If there are updates to the game I believe it will automatically download in the background, although I'm not sure if that always retriggers the loader the next time the game is run. Don't quote me on any of that though! :-)

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies