Can someone please tell me how I can prevent my bullet from shooting into the next scene and killing enemies before they appear? Thanks
Hi there @mattdryer, you can add a component to your bullet. Select the bullet in your scene and click "Add Component" bottom right of Buildbox and set the "Sleep" distance to a certain number. (see image). This will stop your bullet from constantly travelling. You'll have to play around with the distance number a little until you get it just to the point of out of the current screen.
Hey @mattdryer, I'm sure there are many other ways, that was just the first one that popped into my head I suppose you could also create a fake invisible enemy that sits on the border of your current scene. I would probably drop in a small square image, I often use something tiny like a 10 x 10px coloured square, so it doesn't take up too much atlas space and then stretch (scale) it to fill the side of your screen where you're trying to stop the bullets from passing. Make it reasonably thin so it doesn't get in the way of any gameplay area and set it's health component really high, to something like 9999, so it can soak up any stray bullets. Once you're happy it's working as you want, set it's transparency to -1 and it'll disappear from the screen but will be working in the background, stopping any bullets from passing into the next scene. That's another way to do it, but I'm sure there are many more possibilities.
Old thread, but thought I'd comment in case anyone else was searching this like I was. AGobery has it correct, however if you have objects that spawn off screen, e.g an enemy that starts off screen and comes across, then these will not spawn. So if you set the Back and Sides deletion threshold on your world to 100. These enemies will still spawn, and your bullets won't kill anything that's far away.