Detecting 'actorOut'

QuireQuire Member Posts: 54
edited November -1 in Working with GS (Mac)
What's the best way to detect when an actor STOPS overlapping another? In effect, the equivalent of a mouseOut in javascript, but based on actors, not the pointer.

Comments

  • POMPOM Member Posts: 2,599
    Hey I think the best way is to use the otherwise section in your overlapping rule.

    Roy.
  • QuireQuire Member Posts: 54
    Would that not activate immediately, seeing as how the objects are not initially overlapping?

    Just tried it, and yeah, it does...BUT, it also gives me an idea for a couple of flags that will tell me when an actor 'leaves' another.

    Set a boolean called Over to false. In the otherwise of the collide, check to see if it is true before executing. Set Over to true when the actors collide.

    Nice! Thanks for your help and inspiration, Roy!
  • POMPOM Member Posts: 2,599
    Yea in this case you need to make a flag , good job mate.

    Glad to help.

    Roy.
Sign In or Register to comment.