I can't go left

This forum is currently in read-only mode.
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Well, I can but it doesn't work properly. Here is what I mean:

    -I can move up, down, and right, smoothly

    BUT...

    -When I change the code to be able to move left, the following problems happen:

    1. The screen skips bizarrely on some kind of delay.

    2. The blue triangle marker on the right of the screen is supposed to become visible when the red square leaves the screen, and then it's supposed to follow the red square's Y coordinate. That all works until I change the code in order to go left, because when I make it go left the code for the blue marker no longer works.

    I got some help for this from another good member and he did great job helping me to get it to the point it is now, but this one last piece is maddening :-(

    File: Unavailable due to upload expiration.

  • Hi MrMiller, here's the code as text for going left (you have an older version of Construct than R2).

    + Sprite2: X Less than 364

    -> System: Scroll to X (1280/2) + (Sprite2.X - 364)

    You can also prevent the white space by deleting the Y scrolling event, then the camera will only scroll horizontally

  • Hi JayJay,

    I just inserted the code example there, and I noticed that I was able to acheive the same result with different code before, but the problem is still that the blue marker no longer operates properly (it leaves the screen when I go left). I'm trying to figure out a way for it to always stay at the edge of the screen and follow the red squares 'Y' coordinate, no matter how far to the left I go with the black square.

    Here is an example: youtube.com/watch

    Notice how no matter how far to the left the guy with the ball runs, the marker on the right is always still visible and following the Wide Receiver's Y coordinate (the Wide Receiver is the guy he eventually throws to).

    P.S. The white space is okay. The more space the better; it's intended to be space where the user will be adding graphics.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It does still follow the Y co-ordinate of the Red square I believe, and the reason it is not showing on screen is because the X position is constantly 1256.

    Replace 1256 with: 1256 + (Sprite2.X - 364)

    Glad to see the white space is okay though, I had worried about that. In that case do you only want white space on the top? Change the condition 1280/2 to 720/2. Or, if you want the white space on all sides change the whole condition to Always.

  • Okay, I see what you did there :-)

    It seemed like I could only get one or the other (left scrolling but no icon, or icon but no left scrolling).

    Thanks so much, JayJay!

  • No problem MrMiller, glad to help =]

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)