Question about destroying an actor

KempProductionsKempProductions Member Posts: 139
edited November -1 in Working with GS (Mac)
I know there is a way, but i havent figured out the best way. How would i destroy an actor when it goes completely off the playing screen?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    have 4 rules on the actor you want destroyed that say:

    Rule 1: If self position x <0 then destroy actor

    Rule 2: If self position x >480 then destroy actor

    Rule 3: If self position y <0 then destroy actor

    Rule 4: If self position y >320 then destroy actor

    Hope that helps,

    QS :)
  • KempProductionsKempProductions Member Posts: 139
    Thank you QS. I just needed it for x because i have gravity and an actor that everything collides with at the bottom.
  • quantumsheepquantumsheep Member Posts: 8,188
    No problem!

    Hopefully it'll help others too ;)

    QS
  • KempProductionsKempProductions Member Posts: 139
    There is no self position under the rule. I just see mouse button, overlaps/collides, key, mouse position, or touch.
  • rebumprebump Member Posts: 1,058
    Change the rule from "Actor receives event" to "Attribute" then you will find it in the expression editor ("e") textbox.
  • KempProductionsKempProductions Member Posts: 139
    Thanks rebump. I found it shortly after i posted.
Sign In or Register to comment.