AnD4D's Forum Posts

  • While the lerp expression eases out, I'd like to ease in as well. Is there an expression that will allow this?

    I've done a search, and found a list of examples, including a great one by Yann, but unfortunately it's over my head. I simply don't seem to grasp function parameters yet.

    I'm looking to have an angle that smoothly transitions from one to another. ATM I'm using lerp, and the sudden start is a little disorientating.

    Any help would be appreciated.

  • I settled for:

    X/distance(X1,Y1,X2,Y2)

    X = the mass or size or density of the object.

  • New question though!

    How do I increase the gravity pull, not only based on the distance, but also on the size of the object?

    So the larger the object, the greater the pull of gravity.

  • blackhornet

    Nope <img src="smileys/smiley36.gif" border="0" align="middle" />

    Thanks for trying though! I'm starting to wonder if I made the whole thing up.

    It was something like:

    1-(distance(x1,y1,x2,y2)/1000)

    *EDIT - Turns out that was it! Weird...

    Thanks everyone!!!

  • zenox98

    Yeah, I saw that one, but it's more complicated than what I had in mind. I used to be able to do this with a single event. The thread I remember has got a picture which shows a planet, and a series of 'zones'. Each one pulls stronger the closer it gets.

    Someone then came along and told the poster how they can improve this... but I can't remember who, or what. Trying to look back to my old posts to see if I commented on it, but I can only look back 10 pages apparently...

  • Sorry about the repeat! I know there's a post about this somewhere, but I've been searching for the last half hour and can't find it anywhere.

    I'd like to have the system set up so that gravity increases the closer you get to an object, and decreases the further away you get.

    I've seen this work before, and I have a feeling it ends with *-1, but I'm not sure how to get this sorted.

    It's like a reverse distance. I want a number to get higher the closer it is.

  • Tagged for future reference.

  • LittleStain

    Might you be able to update the capx I posted with that change? I'm trying it out, but I'm not able to get it working. Eventually the tiled background just moves off like it was before.

    *EDIT - Nevermind, got it working with

    viewportleft("Parallax")-1280

    Thanks a lot!

  • I tried the way posted, and it appears to be overly complicated.

    Might there be a simple way to set this up?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, I ended up just setting the size to crazy high. Not sure what problem that will cause, but will give your method a go if I see some problems :)

  • Ok, gonna bump this one I'm afraid, as I am working on a very tight deadline... SORRY!!!

    If anyone can help, it would be greatly appreciated!

  • LittleStain

    Here ya go!

    https://dl.dropboxusercontent.com/u/50465867/Construct/Scrolling.capx

    Play it as it is, and it should scroll fine. Change the parallax to 50,50 and it breaks.

    Also, could you try changing the default movement from bullet to 8 direction or car movement? Does that break the program for you?

  • justifun

    Sorry I should have clarified. I have no issues making the sprite. My problem is having that sprite loop seamlessly in all directions while scrolling in Construct 2 when using a tiled background and 50,50 parallax.

  • http://www.scirra.com/forum/topic82500_post480911.html#480911

    <img src="smileys/smiley17.gif" border="0" align="middle">

  • I know how to scroll infinitely horizontally and vertically, and I can figure out how to do them at the same time, however, as soon as I throw parallax 50,50 into the mix, I can't seem to get it right.

    Anybody had any luck with this?