How come Scroll to action gives unreliable results?

0 favourites
  • 7 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • 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.

  • 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".

  • 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.

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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) 😁

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