Not using spawn - Help!
hrsmedia
Member Posts: 522
So I am trying to make actors move down the screen at random positions. Initially I did this by spawning actors at random times. But I have found that because I am using a scrolling background the screen jerks/judders a bit every time the actors are spawned.
I guess I have not noticed this jerk/judder in the past because I have not used scrolling backgrounds before. (Scrolling background method: if position y <=240 change attribute position y to 720+240+position y)
So I have tried applying the same formula I am using on the background to the actors coming down the screen.
But when I try to add random to the actors like: if position y <=240 change attribute position y to 720+random(50,240)+position y and change attribute position x to random(0,320) the actors disappear off the screen.
Can anyone help?? Am I doing something wrong? Is there a better way to do this?
Edit: I should add that this method works at first, but then they start to disappear after about 20 seconds or so..
I guess I have not noticed this jerk/judder in the past because I have not used scrolling backgrounds before. (Scrolling background method: if position y <=240 change attribute position y to 720+240+position y)
So I have tried applying the same formula I am using on the background to the actors coming down the screen.
But when I try to add random to the actors like: if position y <=240 change attribute position y to 720+random(50,240)+position y and change attribute position x to random(0,320) the actors disappear off the screen.
Can anyone help?? Am I doing something wrong? Is there a better way to do this?
Edit: I should add that this method works at first, but then they start to disappear after about 20 seconds or so..
Comments