toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Question about destroying an actor
KempProductions
Member
Posts:
139
February 2010
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
quantumsheep
Member
Posts:
8,188
February 2010
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
KempProductions
Member
Posts:
139
February 2010
Thank you QS. I just needed it for x because i have gravity and an actor that everything collides with at the bottom.
quantumsheep
Member
Posts:
8,188
February 2010
No problem!
Hopefully it'll help others too
QS
KempProductions
Member
Posts:
139
February 2010
There is no self position under the rule. I just see mouse button, overlaps/collides, key, mouse position, or touch.
rebump
Member
Posts:
1,058
February 2010
Change the rule from "Actor receives event" to "Attribute" then you will find it in the expression editor ("e") textbox.
KempProductions
Member
Posts:
139
February 2010
Thanks rebump. I found it shortly after i posted.
Sign In
or
Register
to comment.
Comments
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
Hopefully it'll help others too
QS