Help with a recycling method.

SynstealSynsteal Member Posts: 32
edited December 2011 in Working with GS (Mac)
I need some help with a recycling method and I can't quite crack it.
What a I currently have is an actor let's say Actor 1 spawn a actor, and let's say Actor 2 where ever the screen is touched so at game.Touches.Touch 1.X and game.Touches.Touch 1.Y. When Actor 2 is spawned it grows to a certain size then destroys itself. You can see it better here, you touch the screen to create a ripple to destroy the gas clouds: http://arcade.gamesalad.com/g/28262 . I am finding that the game slows down immensely as it goes on and I figure that the continuous spawning and destruction of Actor 2 is using too much memory and makes the game unplayable around level 5-6. Could anyone help with that effect? I'm already using recycle methods for several aspects of the game but I just can't get it for this ripple/shockwave effect.

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    Tshirtbooth has an excellent recycle video:

    http://gshelper.com/

    your case you would just have to move (changeAttribute self.Position X,Y) Actor2 to the touch..Positon.X,Y … grow and move to origX, origY.

    MH
  • SynstealSynsteal Member Posts: 32
    that vid helped alot. works like a charm. thanks alot
Sign In or Register to comment.