davidross900's Forum Posts

  • I'll create a quick image now of what I mean.

  • Won't that cause both enemies to spawn at the same time?

  • Hey I was having trouble with the spawning time of my enemy. I previously asked this question and couldn't get an answer for it.

    Here is the link to the question. If you could answer on that page, that would be great! thanks so much

    Link to forum question: scirra.com/forum/viewtopic.php?t=128470

  • Yeah here is a screenshot.............

  • But when i code 'on start of layout - destroy enemy' the enemy doesn't spawn at all after that since its just been destroyed

  • Okay my game consists of an enemy that can spawn in 1 of 2 places. I did this by copy and pasting the enemy and then using the 'pick random instance' and then create enemy. (they spawn every 2 seconds)

    When running it through my browser it works fine and it chooses one of the to spawning positions as I wanted. I have created a front page for the game which is basically an image and the play button which will take you to the game layout, which again when running through my browser works fine. However...........................when I run it through my browser just for the very start of the game it will spawn 2 enemies either overlapping on another or from both spawn positions together.

    I can only assume that when I run it through my browser, when I'm on the start layout and not the game layout if I wait 2 seconds or more then the game layout is already running and therefore will spawn an enemy (since it spawns every 2 seconds) which will accompany the other enemy.

    I thought that I should then have that 'on start of layout'............and then input the **'pick random instance' and then create enemy**. This still didn't work.

    Does anyone know what I'm doing wrong?

    THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!

  • I ran it again and it seemed to be fine. I change the maximumSpawnTime to 6 instead of 5 since at 5 the enemies like you said spawn at 1,3 seconds. So I thought it could further be made difficult by spawning every 0.5,1 or so. So I played around adding 6 which I think was too much since this time they overlapped a lot since 6 is too high I guess, so what can I do to reduce it to 0.5,1 spawn rate???

    P.s thanks so much. Think I finally made progress

  • piszozo it says I needa reputation off 500 before sending a private PM :/

  • but every so often the enemies seem to overlap each other?????

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know I'm asking for a lot but I feel really dumb right now :S

    Is it possible you could make a really quick CAPX of it? Don't want to keep bugging you both so only if you have the time.

    Thank you.......sorry again

  • is this what you meant?

  • Okay I know I'm probably getting really annoying now haha. I'm so confused I don't even know why. Heres what I've done below.

    I know I have filled in the 'else' but even without that I'm sure I've done it wrong

  • sorry about the duplicate message, scirra was playing up a little

  • Tylermon yeah it is a bit confusing the way i've done it. I originally had the following....

    every(5,8)seconds | Create object(enemy) <----------- This is the Spawn Rate.

    Then i wanted the level to get harder by subtracting from the spawn rate time so I created the global variable SpawnTime.

    So if I add 1 to the SpawnTime and I have this subtracted from the spawn rate, then eventually the spawn rate becomes 0 which I don't want.

    I was hoping I could get it to -----------> every(0.5,1.5)seconds.......for example

    so is this how I should code it:

    Spawn rate-spawn time > 0

    and then this being the condition?................Every random(spawn rate - spawn time).................is that what you mean?