How come Scroll to action gives unreliable results?

Discussion and feedback on Construct 2

Post » Fri Jun 05, 2015 7:50 am

Hey guys, I am new to construct and have ran into a problem, and would love a pointer.

I have divided my layout into 3 separate parts and have made arrow buttons to move between them using "mouse>on left-clicked>system> scroll to position. But it jumped to the 3rd screen skipping the middle one. so i tried using 'scroll to Y' same problem. So I tried making a 1 pixel sprite as a position marker, still no luck.

Now I know that if I make 3 layouts, moving between them works, but I want to be able to create objects on screen 2 from screen 3, and I can't see a way to do that. Any thoughts? sorry if the answer is somewhere else, I have looked for it. Any help would be much appreciated, thank you.
B
6
S
1
Posts: 12
Reputation: 332

Post » Fri Jun 05, 2015 8:36 am

It likely would be easier seeing exactly how you've set up your project to help with your primary issue.
I'm guessing, through your depiction of "middle screen skipped" that you may have a serie of events that will happen in line.
Moving your camera from a position A to a position B, and in the next event checking if the camera is in B and moving it in C.

The issue is that events are read from top to bottom, so the first event is true, and so the camera is moved to B. Then the next event is checked, and is true, since it checks if the camera is in B, which it is since it has been moved in the previous event.

To correct, make sure to add a system condition "Else" in the second event.

That's the best I can guess without seeing exactly how you've made your project. Consider posting your capx this will make it easier to investigate the issue.

"Scroll to" action is reliable, unless you've modified the layer's parralax property which may appear as "different".
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Fri Jun 05, 2015 9:13 am

[img]https://drive.google.com/file/d/0B4Dcw2IzgvSPS2ZTM0R6bnlPZzA/view?usp=sharing/img]

Thanks for the reply, sorry I don't feel right about posting my full file, I tried to attach a screen shot of the part of the event sheet, but don't know if that works till I post it. Sorry I'm having a shocker, might call it a night.
B
6
S
1
Posts: 12
Reputation: 332

Post » Fri Jun 05, 2015 10:00 am

It's really hard to help without a full .capx - you could easily have another event which is just cancelling out the results of those events.
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133

Post » Tue Jun 09, 2015 5:02 am

You are right Ashley. It seems that 'mouse over double click' was staying true for the second window even though the sprite button for the second window is different. when I changed to single click the problem stopped. Here is the file guys I am pretty sure that it points out a bug.
removed httpsas i am not able to post urls drive.google.com/file/d/0B4Dcw2IzgvSPVkpWNHRJaXE4M0E/view?usp=sharing
B
6
S
1
Posts: 12
Reputation: 332

Post » Tue Jun 09, 2015 3:56 pm

The touch function has a similar "defect" where a touch input will persist over layouts for fractions of a second - triggering buttons on different layouts that have the same position.

It's easily fixed with a fraction of a second wait before calling go to layout or using on touch end.
B
64
S
25
G
10
Posts: 654
Reputation: 10,842

Post » Tue Jun 09, 2015 11:26 pm

Great news, thanks Elliott, now I know I,m not mad(in this situation anyway) I can move on with my life(that doesn't sound mad at all) 😁
B
6
S
1
Posts: 12
Reputation: 332


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests