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.