How do I make infinite walk in a circle

  • Hi,

    I'm trying to make a top-down game with infinite walk kind, where in the ending of X axis you go back to beginning of the X axis.

    I did it by setting "In the ending of X, set player to X 0", but it just make it appear there, not the way i want (keep walking like in a circle, repeating the level over and over again)

    How can i do it?

    Thank you

  • Is the issue just that it looks like you're just teleporting from the edge? Would just copying whatever you have on both sides just beyond the other sides edge be reasonable for your game? If you have lots of enemies or something that should be able to path through the loop it might be harder to do properly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is the issue just that it looks like you're just teleporting from the edge? Would just copying whatever you have on both sides just beyond the other sides edge be reasonable for your game?

    That would be nice, but how i do it?

    I was thinking like walking inside a O'Neill Cylinder, so if i keep walking to the right, i would see where i started.

    Is there a way to make it happen?

  • I guess you'd just have something like

    if Object.Y+viewingDistance<leftEdgeY+viewingDistance and Object.Y>leftEdgeY then create object at same X and for Y rightEdgeY+(Object.Y-leftEdgeY)

    Then change edges and +es to -es to do copy the other side and same thing but with X to get up and down edges.

    Probably would want the objects that get mirrored so in 1 family so you don't need to make it for each object separately.

    Or you could just do it manually.

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