Check for dead?

HappyKat78HappyKat78 Member, BASIC Posts: 173
Hi guys,

I believe when an actor leaves the screen (or is it the scene?) by a certain amount of pixels, he will automatically be destroyed. Currently when I destroy actors I add to a count attribute I.e "deathcount". As I'm not destroying actors that leave the screen/scene myself, how can I check if game salad has destroyed an actor and add it to my deathcount? I know I could kill the actor before game salad does, say the second it leaves the scene/screen, but I actually want the actor to be able to leave the screen/scene a little.

Thoughts?

Thanks,

HK

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782
    The actor gets destroyed if it is farther than 500px from the edge of the total scene size, not just the visible part.

    Therefore, you can make your scene bigger, that is, give it a border outside the visible portion of the scene.

    In this border you can then control the destoying of actors either by rules checking the distance it is out of the visible part of the scene, or by placing actors in this border area which will trigger the destroy of the actor if it collides/overlaps with these.
  • mathusalemrexmathusalemrex Member, PRO Posts: 116
    I do a timer in all my actors that kills em after around 20 seconds, its the only way to be sure...


    Check for Dead sounds like a the name of a cool game to me...
  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited June 2013
    @mathusalemrex not as a game, but as an Accounting app for Hitmen
  • HappyKat78HappyKat78 Member, BASIC Posts: 173
    haha! Ok, thanks guys. Wish there was a "If actor is destroyed..." function, would make life easier. :-)
  • saif_shammarisaif_shammari Member Posts: 128
    make new actor and name it destroy
    and put it down in the edge of the scene
    make rule in the main actor
    when overlaps or collide with actor destroy
    destroy this actor
    i hope it help :)
Sign In or Register to comment.