how to stop the camera following my actor when he falls

FirstDanFirstDan Member Posts: 208
edited February 2012 in Working with GS (Mac)
hi everyone

I have an actor who controls the camera, when the player jumps up, the camera follows, what i want is the the camera to stop following my actor when the actor falls down. I understand you can do when-self.motion.linear.verlocity.y >0 --control camera else blank,
this works but i have a platform that is interpolating up and down, so when my actor is jumps on the block, it jitters, whats happening is that the actor gets reset to the bottom of the scene i think?

i have a scene in portrait mode that 2000, when the actor is at 1000, and he falls, i don't want the camera to follow my actor down,

thanks
hope that makes sense :)

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    When your actor is falling.. do you have a like an attribute "game.GameOver" that is flagged to true?

    If you do , then simply put a rule :
    When "game.GameOver" is FALSE
    control camera

    Roy.
  • FirstDanFirstDan Member Posts: 208
    @p-o-m - thanks for your reply, yes i have a flag called game over, but that is situated at Y -25,
  • POMPOM Member Posts: 2,599
    Ok , since i don't know the nature of your game I'm shooting in the dark here..

    My suggestion is to drop the "control camera" rule out of your actor ..
    Create a new actor - CAMERA CONTROLLER - put it in the scene , double click it (to unlock the lock) ,and give it the following rule :
    When "Current.scene->layers->you actor's layer->your actor's name->position.Y" IS Grater than "self.position.Y"
    Interpolate "self.position.Y" to "Current.scene->layers->you actor's layer->your actor's name->position.Y"

    This way your camera actor will only go up , but not down..
    I hope it will help you get started..
    Roy.
  • FirstDanFirstDan Member Posts: 208
    @pom - that doesn't make sense to me but thanks for your help
Sign In or Register to comment.