R0J0hound wrote:You could give the object you want to spawn in the bullet behavior then you could do this:
every 1 seconds
--- create sprite at (random(640),random(480))
--- sprite: set angle to random(360)
--- sprite: move forward -640 pixels
sprite: bullet distance traveled > 640
--- sprite: set speed to 0
There's also the third party move to behavior that may be useful here.
Actually that is somewhat close to what I am currently trying
My real issue is having the object created off-screen first, than launching the object at an angle on the veiwport than having that object stop randomly on the veiwport.
I have managed to get this kinda working, I used create object at (spawner-sprite) off screen than using bullets angle of motion at random(0, 90), this will effectively launch the object from the spawner-sprite onto the viewport on a horizontal angle, I wish I could do random(0, 90, 140) and encompass a larger area for the objects bullet to launch, the real problem is that some of the objects get launched on the border of the window and are half in/half out of the screen, of course this is because I am using a random angle as well as a random speed for the bullet launch, and I am not sure how to prevent it.Edit :
I managed to get the angles correctly working, now my only issue is destroying the object after it leaves the play screen without interfering with the object being created at the spawner-sprite.