WhifferSniffers's Forum Posts

  • 12 posts
  • Ok, so you saying that made me realize my mistake, I was using the compare variable, the variable being "timer". I thought that it would only go through the condition once, but it was continuously spawning them over each other adding more and more until it started to freeze up the computer because "timer"=0.

    So I've added the trigger once while true after that and it seems to be working now.

    Thanks!

  • I'm not quite understanding your post, not sure if you're trying to answer the question? When the timer = 0 the Time's up text does spawn, everything works as intended, it's just that it starts making my pc freeze for no apparent reason.

  • So I'm testing out my game, it's no where near a complicated or sophisticated game, but every time I leave it running for a little bit it slows my pc until it starts freezing. It seems to only happen when I'm trying to stop the game after the timer goes out, all the objects except the backgrounds get destroyed and text comes up saying time's up!

    It only happens when I add the condition for when timer = 0 then it destroys all the objects individually then spawns the Time's up! text in the center of the screen.

    But if i take the condition away the game is fine if I leave it running, but adding that and process in the task manager goes up to like 1,000,000K in the memory, so does anyone know what is causing this issue?

  • Thanks guys, the Sprite.Count worked, the targets no longer spawn over each other!

  • I don't need the off screen sprites, but what do you mean by check sprite count? How do you tell it how to check for sprite count?

  • Still need some help with this, can anyone?

  • Does anyone know this is happening? or a way to get around it at all?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is one of every target off screen, and on different layers from the targets because I couldn't spawn them without at least one on there. But this shouldn't conflict with any of the conditions, because they are off-screen, on a different layer, and not visible. Yes the targets all spawn and I'm just trying to get them to stop spawning multiple over the same one.

    So for example, Target1 will pop up but then a second Target1 will spawn and pop up in front of the first Target1. So I'm trying to target whichever Target1 is on-screen at the time and say if there's a Target1 spawned/on-screen do not spawn another Target1 until it is no longer on screen. I hope that makes sense.

  • Probably a dumb question, but I'm making a game where targets pop up randomly and you have to hit them, so I have it set up the system will randomly spawn targets, all the targets spawn in the same respective area, but sometime a target spawns over the same target, which I don't want to happen.

    So I've added the Sprite is on screen condition and inverted it, so it should be if the sprite is not on the screen then the action runs, but it just kinda doesn't work. The condition seems to just get passed over like it's not there. I've also tried inverting is on layer and is visible, but they don't work, they'll either get passed over or it wont spawn any targets. Is there a reason this is happening? Is there another way to make the system not spawn the same target again if it has already spawned and it's on screen?

  • I've been trying to mess with the code to make the snowball sort of like, if it was an animation, render more frames of the animation of the arc, but the stuff I've messed with in the code just makes the snowball faster or larger, is there a way to use the code to make it more smooth or would I need to try a different way to make it work to make it smoother?

  • Thanks so much! This will really help me out, I'm playing around with the settings in my game to get it right, but looks good!

  • I was trying to make my 2D game have kind of like a faux 3D aspect, you basically throw snowballs at targets. The game is just basically a flat background and targets will come up and you have to hit them. So I'm trying to make the snowballs being thrown to have an arc and to recede in space as they go farther away. I made the game in Flash, but I'm trying to use Construct 2 to recreate it and possibly make it better. The game is at my website, but my url got removed if you search for my username "Whiffer Sniffers" you will most likely find the site, it's for some reference to what I'm talking about.

    I've gotten the snowballs to shoot out of a kind-of "turret" and it shoots wherever the player aims to, but the snowballs just fly straight off the screen. I've tried adding gravity, which just makes the snowballs fall right back down, and I've tried to add some force/inpulse but then the snowballs just spin around like crazy they are orbiting something and fly off the screen. So is there a way to make the snowballs act like they do in the other game, where they look like thy actually go into the screen rather than just off the screen?

  • 12 posts