Is There An 'If Screen Following' Command?

TwilightHunterTwilightHunter Member Posts: 146
edited November -1 in Working with GS (Mac)
Hey, I'm fooling around with an engine of Parallax Scrolling of different layers that I made. Right now it almost works, but theres a minor.. hehe... issue. I have it so that when 'Right' is pressed, not only does the character move, but the background moves as well. Now, this works so long as you continuously run, but some really obnoxious image doozies come into play when you stop occasionally (Stop then speed up, the background moves but the screen is not yet following your character, makes it look like the background is moving and not you. Very interesting xD )
Anyway, can I have the move command on the background trigger only when the screen moves with my character? Any help would be hot, thanks!

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    make it so when is right is pressed: change attribute game.move right to true.... otherwise change game.move right to false...

    When game.move right it true: "insert parallax scrolling here"
  • TwilightHunterTwilightHunter Member Posts: 146
    That's what I got. But when right is press the background starts moving with Move, and the character uses Accelerate. Accelerate takes longer to start up so the background starts moving before the character. I had the background on accelerate before but it started slipping and sliding when right was released.
  • TwilightHunterTwilightHunter Member Posts: 146
    Alright I used a timer to make things a little more seamless. I have a time set for 'After .1 seconds, move right' When Right is pressed. It works better I guess. For now it's good.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    have you just tried changing the camera size so it is really tiny? then the camera will follow every move.
  • TwilightHunterTwilightHunter Member Posts: 146
    Yeah I tried that, it helped, but it's not perfect. I'll live with it I guess o_0
  • chosenonestudioschosenonestudios Member Posts: 1,714
    You could do it so after your main characters x coordinate has changed enough it could start moving
  • TwilightHunterTwilightHunter Member Posts: 146
    Hrmm... I can see where that would work. Thanks, I'll give it a try! :P
Sign In or Register to comment.