Scrolling with 0 Para....

0 favourites
  • 8 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • If this is answered somewhere I apologize and please point me in the right direction.

    I have created a "floating" control pad that appears whenever the player touches the screen. It also moves the Sprite in the direction you touch, as it should.

    The layout is a square 1024 x 1024, with a 512 x 384 Screen Size, this works perfectly on all the test devices on the XDK site.

    Where i'm running into trouble is, this is used in a "Scroll To" Ghost Shooter type game. I cannot for the life of me get the controls to "stick" in one spot while the screen scrolls along the layout.

    If I set the "Controls" layer (Layer with the controller in it) Parallax to 0,0 the controller will not spawn below the halfway point, ie: Player sprite begins at the bottom of the layout.

    Is there a way to keep the Controller Sprite in a relative screen pos w/o fiddling with the parallax settings?

    Thanks in advance.

  • You called too many things 'Controls' or 'Controller' when explaining so my brain collapsed. What is the issue here? Please link to a .capx so I can better understand the issue.

  • <img src="https://dl.dropboxusercontent.com/u/36472942/construct/forumhelp/Parallax-vs-noPara.png" border="0" />

    The control pad is on his own layer with parallax to 0,0.

    Notice how the dashes act as a representation of the Window size (size of the project) and so you should use them as a marker to know where to place things.

    The player sprite is on his own layer with a parallax of 100,100.

    To help you visualize, you can set the layer's property "Parallax visible in editor" to Yes.

  • Kyatric

    Yep, that's how I usually set up the scrolling with parallax stuff for my HUDs. Not sure what the issue is that he needs help with : (

  • It was where to position the control pad so that it and the player sprite displays both.

    Issue should be resolved with the "drawing" in my previous post.

  • Kyatric

    Capx

    If you set the "Controls" layer to 0,0 parallax it will not spawn properly in the bottom half of the screen. The conrols need to be able to spawn and scroll no matter where the "Player" is on the screen, and stay in that position until the user stops touching the screen.

    This is meant to be a "floating" control pad, so no matter where on the device the Player touches it will show up. I just can't get it to "anchor" in the relative location and "follow" the scroll effect. It either does not move, or with "Every Tick" it seems to "race" the Player sprite.

    Thanks in advance.

  • Use Touch.X("Controls") & Touch.Y("Controls") with parallax set to 0,0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet

    You are a genius! Thanks so much, I figured it was something small like that.

    Thanks again!

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