Not using spawn - Help!

hrsmediahrsmedia Member Posts: 522
edited November -1 in Working with GS (Mac)
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..

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Are you building for iPhone or iPad?
  • hrsmediahrsmedia Member Posts: 522
    iPhone
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    My guess is that your expression changing the actor's Y is sending it off screen. Even with a scene set to wrap you have to keep your actors in the "safe zone" or they get destroyed.
Sign In or Register to comment.