Heres my problem: I have a character that shoots a very fast machine gun, ant it creates spent shells that eject out of the top of the gun and fall to the ground, and destroy. But after a few seconds of shooting, the shells create at randon locations on the screen! weird eh. I've tried using 'load on call' and 'discard after use' but it didnt help
There could be a number of things... wiether it be hots spots... or anther related thing...
but i would guess; the problem is caused when you have an always event or a press down on key even where an object is shot from another object... if the object that shoots the other one is not present (ie destroyed) then things get screwy
i think they are falling so far off the bottom of the screen that they are appearing at the top again and picking up speed as they go so when they flash on the screen for a split second it doenst dissapear.
just a guess anyway
i think you may need to make the object dissapear if it is 0 pixels from the windows edge.
Make the objects get destroyed when from -3/4 object size from window.....for example
8x4 bullet destroyed when it reaches -6 pixels from window(-3/4 of
I use events like this for testing mouse positions and scrolling near the edge of the screen.
48x32 char reaches -32 pixels from window
-destroy
Useful to have the character vanish entirely off the screen before being destroyed.
One suggestion...if your gun shoots very fast, have clips, or rounds. Then, if you fire a bullet every 00-05 seconds, create a falling clip every 00-25 seconds to help avoid the object limit.
ahh this problem, i have encountered this every game. i did solve it once. this was caused by the bullets not getting destroyed outside the playfield, although i did have a command for it to destroy.
i solved this by having extra commands like
~when bullet leaves play area = destroy
~when bullet outsider play area = destroy
and so on.
doesn't seem the best of bug fixing but it worked for me
Destroy bullet when it reaches -6 pixels from window fixes your problems spiderhead...one simple line for small objects.
Anyway, one problem with the paste into background command - as soon as any part of the pasted background leaves the window, it vanishes. This is annoying as it can chop bullets, ladders, etc. in half when pasted into background.