[Solved] Possible to recycle an actor when out of screen bounds?

Uuemaich

  • Posts: 52
I don't know how to recycle an actor when they're out of screen bounds. Like, not when they're off camera, but only when they go past the actual edge of the map. I need them to fully function on the entire map even when I'm not close to them, and only recycle themselves once they leave the maps bounds.

Thanks!

« Last Edit: April 13, 2012, 06:11:54 am by Uuemaich »

Uuemaich

  • Posts: 52
Is there a way to accomplish this without having to set the X and Y for every scene?

Miasmos Games

  • Posts: 878
Firstly, I think you therefore mean the scene bounds. Screen bounds are the area you can see, and as you said you want it to die when it goes outside the "map" or the scene. You can find blocks for scene width and height under Scene>World in design mode, or just search for them. You then do a check to see if the actor's x is less than 0 or more than the scene's width, or if its y is less than 0 or more than the scene's height, and if so then recycle it.

Cupcake Bounce

Uuemaich

  • Posts: 52
Crap, sorry. Yeah, I meant scene bounds.

But thank you, that did the trick! :D

Recycle actors does not currently work, unless it's been fixed. That's for iOS.