I can't go left

For questions about using Classic.

Post » Sun Jun 24, 2012 3:13 pm

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.MrMiller2012-07-12 14:43:11
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Jun 26, 2012 4:19 am

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
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jun 26, 2012 5:24 am

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: http://www.youtube.com/watch?v=FRXmvEHWIJI
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.MrMiller2012-06-26 05:26:06
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Jun 26, 2012 5:37 am

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.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jun 26, 2012 2:51 pm

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!
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Jun 26, 2012 6:16 pm

No problem MrMiller, glad to help =]
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests