How do I swipe screen left to reveal sprites outside of view

0 favourites
From the Asset Store
Weather Sounds contains 132 sounds from them 64 seamless loops
  • I have a layout with a background image.

    On top, I have a layer with images which I want to be able to swipe left which reveals more images. I have no idea how this would be done?.

    Any ideas/suggestions?.

  • I've done this before by using a large sprite with the dragDrop behavior to move it, as well as the pin behavior for the other sprites to attach them.

    Then also one or two events to limit how far you can drag the sprite. Something like

    Sprite x < 0

    --- set sprite x to 0

    Sprite x > 640

    --- set sprite x to 640

  • Thanks but not sure it's going to work for exactly what I need.

    So far I've added a background sprite which does nothing. I then created a new sprite which is the same height as the layout, but slightly longer. I modified the collision polygon to bounding box. I then added a drag drop behaviour to it for horizontal only.

    This works well - I can swipe the screen beloe the level thumbnails and the levels will move to the left, revealing more levels. But - since it uses a single sprite, I am unable to work out how the user can select a single level to take them to a new layout. Because it is one big sprite, everything gets selected.

    Really stuck with this - someone must have an idea?. Can parallax be used with this?.

    Edit: Just found this and it's similar to what I need, this example is from another tool though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The level rectangles need to be pinned to the sprite you drag and then you can give the rectangles a variable with the name of the layout to go to, which you can use with "go to layout (by name)"

    https://dl.dropboxusercontent.com/u/542 ... lide2.capx

  • Hi,

    Thanks this is almost exactly what I need. The problem is the background sprite/image needs to be still. It works fine for a solid color background but using a a picture/image instead moves the picture as well as the levels.

    How to get round that?

  • Use a separate sprite that is invisible.

  • ..and simplest way to "align levels" on Drop?

    from this..

    to

    Edit: something like this...but with less events...

    capx:

    http://s000.tinyupload.com/index.php?fi ... 9900497497

    Thanks!

  • Thanks R0j0, blackhornet and korbaach,

    Had plenty to play about with, for some reason cannot get OR blocks to show up, read up and doing everything right but they wont show?. Anyway really liking that Korbaach and I've began to base my own off your version.

    But for some reason the invisible slider will not move/slide after it's been swiped left for a little bit. After a certain point it will just move the slider. Been messing about with it for some time but no joy

    I've attached a capx file too...

    http://inspiredappdesign.com/test.capx

  • chewz

    ..you need to set "roller" origin point x=0...

    capx:

    http://s000.tinyupload.com/index.php?fi ... 8965697697

  • Thanks, appreciate it.

    Don't really understand it though. Set WWidh to WindowWidth?.

  • ...only to avoid the hard numbers...

    ..in my example WindowWidth=640....in your capx WindowWidth is 1280

    if you set variable(WWidh ) to WindowWidth. code like clamp(Self.X, WWidh-Self.Width, 0)

    works in both cases..

    and I noticed that if I use WWidh/2 instead of the WindowWidth /2 it litle lessl agging when i compare X

  • How to simulate "touch up" instead of "inverting touching object"? When in unity we can do mouse-down and mouse-up

  • How to simulate "touch up" instead of "inverting touching object"? When in unity we can do mouse-down and mouse-up

    On touch end.

  • Elliott: I mean touch-up on the object, i like the example capx of the R0J0hound, but user failed to swipe the level when user swiped on the sprite2 because C2 trigger the sprite2 action immediately.

  • For specific objects you could -

    A) Use a boolean flag to determine when the object touch ends.

    B) Use Nth touch in conjuction with sub-events.

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