recycle actor after destroy?

feromanferoman Member, PRO Posts: 130
edited May 2012 in Working with GS (Mac)
Hello,
For my game, I have 2 actor:
actor A and actor B.

My rule: if actor A touch actor B, actor A is destroyed.
this condition is made.
My second rule: I click a button, the actor B must project the actor A (previously destroyed) using behavior "Spawn Actor," but my actor A not displayed.
So, how recycled an actor if is destroyed.

I expected an idea.

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    To recycle … do not use the Destroy behavior on actor A …
    use changeAttribute: self.Position.X or Y to offScreen area
    then when called for change those positions to onScreen area

    ===
    IMO actorA may have spawned …
    are its X and Y positions when spawned are within collision state of actorB ?
    therefore is A being immediately destroyed ?

    image MH

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2012
    If you are spawning actor A on top of actor B, it will just destroy actor A again.
Sign In or Register to comment.