"recycle actor" behavior

digitalzerodigitalzero Member, BASIC Posts: 639
edited April 2012 in Working with GS (Mac)
OMG wouldn't it be so great to have a "recycle actor" behavior... i can just see it now...

"TIMER" every random(1,5) seconds "recycle ____ actor" of course the actor would have to be on the scene... OMG that would be so lovely... and it would take care of a lot of peoples problems when it comes to lagging... omg GAMESALAD please consider this... my live would be a hell of a lot easier :)

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    edited April 2012
    Please in the future place you posts in the correct category of the forum. Users Browsing the "Coding/Programming or Logic Services" section are generally looking for help with their projects or looking for users willing to pay for help.

    Also, make sure when you chose to submit as a question it is a troubleshooting issue. Otherwise it would be appropriate to select New Discussion.

    I'm moving this now to Suggestions

    Thanks
  • MotherHooseMotherHoose Member Posts: 2,456
    you can already do this in GS …

    remember that GS tracks gameTime; sceneTime; and selfTime
    we do not need separate Timers to reference those times

    on your recyclingActor:
    add actorAttribute: real type … myTime

    Rule: when
    Attribute: self.Time = self.myTime+random(1,5)
    --(change self.Position, and whatever effects you want when actor is in cameraArea)

    Rule: when
    whatever you want to trigger move to offCamera
    -(change position; movement; etc.)
    -changeAttribute: self.myTime To: self.Time

    demo: http://www.mediafire.com/?wrt36ij1fi4x80d

    image MH
  • digitalzerodigitalzero Member, BASIC Posts: 639
    omg thanks so much for that example i really need that!
Sign In or Register to comment.