Control Camera - Don´t move to center!! Please!!

RubiyoooRubiyooo Member Posts: 163
edited November -1 in Working with GS (Mac)
I have a stupid problem. I want to move my actor only to middle of the screen.
But the actor all time invader the right screen!!
I tried with camera mode. Unfortunately i can´t move the rectangle to left position.



Any idea??

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    can you try to be more specific in what you want. I am having a hard time understanding the problem from your description.
  • RubiyoooRubiyooo Member Posts: 163
    scitunes said:
    can you try to be more specific in what you want. I am having a hard time understanding the problem from your description.

    Excusme.

    My actor want that only shoot water in one direction (right) If he cross the right screen. The player never will wacth the next fire.

    image
    image
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Hi Rubiyoo:
    No entiendo que es lo que intentas hacer.
    Explícame un poco más.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think I understand. You want the purple guy to always be on the left side of the screen. Here's what I do.

    Step 1) Create a game attribute called game.PurpleGuyX

    Step2) In the purple guy add a constrain behavior. Constrain game.PurpleGuyX to self.positionX

    Step3) Drag a blank unmovable and invisible actor into the scene, double click on it in the scene, and unlock it (click on the big padlock). Then add a rule -

    when game.PurpleGuyX is greater than 100
    -----constrain currentscene.camera.origin.x to game.PurpleGuy-100

    this will cause the purple guy to always be 100 pixels from the left edge of the camera. The rule that you wrap the camera constrain in makes sure that the camera does not go less than 0 which will show black on the left of the screen.

    Just be sure to NOT use a control camera behavior anywhere.
  • RubiyoooRubiyooo Member Posts: 163
    scitunes said:
    I think I understand. You want the purple guy to always be on the left side of the screen. Here's what I do.

    Step 1) Create a game attribute called game.PurpleGuyX

    Step2) In the purple guy add a constrain behavior. Constrain game.PurpleGuyX to self.positionX

    Step3) Drag a blank unmovable and invisible actor into the scene, double click on it in the scene, and unlock it (click on the big padlock). Then add a rule -

    when game.PurpleGuyX is greater than 100
    -----constrain currentscene.camera.origin.x to game.PurpleGuy-100

    this will cause the purple guy to always be 100 pixels from the left edge of the camera. The rule that you wrap the camera constrain in makes sure that the camera does not go less than 0 which will show black on the left of the screen.

    Just be sure to NOT use a control camera behavior anywhere.

    RESOLVED!!

    Thanks you very very very much!!!
    :DDD

    I promise to make a videotutorial.
    Thanks Scitunes. I so happy :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Glad I could help!
  • spudwafflespudwaffle Member Posts: 1
    currentscene.camera.origin.x appears to be missing in version 0.9.5. Help?
  • old_kipperold_kipper Member Posts: 1,420
    Have not unlocked your instance of the actor in the scene to get to it?

    kipper
Sign In or Register to comment.