Do something when actor goes out of camera

lloydowenlloydowen Member Posts: 78
edited November -1 in Working with GS (Mac)
`how do i create a rule so when the actor goes out of the camera's view it does something? thanks

Comments

  • lloydowenlloydowen Member Posts: 78
    Hmm, is there no other way? that way wouldn't really work, like there are a bunch of 'camera' attributes and im not quite sure what they do, can't i use one of them ? Thanks for your help!
  • cbtcbt Member Posts: 644
    On your actor, add these;

    -when any condition is valid;
    *self.position.X > game.camera.origin.X + self.size.width
    *self.position.Y > game.camera.origin.Y + self.size.height
    -*-Do something.

    ------------
    ---
    That should solve your problem I guess. But keep in mind that this is for landscape mode...
  • lloydowenlloydowen Member Posts: 78
    What you mean unlock?
  • PhoticsPhotics Member Posts: 4,172
    lloydowen said:
    What you mean unlock?

    The actor has to be edited on the scene.
  • cbtcbt Member Posts: 644
    tshirtbooth said:
    the problem with that way is he will have to unlock his actor to do so. Witch may cause him trouble later.

    cheers

    True.. I totally missed that..

    @lloydowen, have you tried any of this methods yet?
  • lloydowenlloydowen Member Posts: 78
    Yeah what i ended up doing, is making a scrollable actor, and moving that to the camera edge so it then move's along with it changed colour to '0 alpha' and then made a collide rule so it then it does something :]. Thanks for your help though guys!
Sign In or Register to comment.