Wrap behaviour

This forum is currently in read-only mode.
  • Is it possible to make the wrap behaviour do this:

    <img src="http://www.quotecats.com/what/wrapbehaviour.PNG">

    That is, when part of an object goes off one side of the screen, you see that part start to come on the other side of the screen.

    This would make the wrap behaviour more useful, as this isn't so trivial to do with events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To achieve such effect you'll have to make 3 "clone object"-s of your OBJECT and put them in container.

    In event you'll go like:

    -> Always

    • > obj1 set Angle, Anim, Frame to OBJECT
    • > obj2 set Angle, Anim, Frame to OBJECT
    • > obj3 set Angle, Anim, Frame to OBJECT
    • > obj1 set Position: X = OBJECT.X mod ScreenWidth, Y = OBJECT.Y
    • > obj2 set Position: X = OBJECT.X, Y = OBJECT.Y mod ScreenHeight
    • > obj3 set Position: X = OBJECT.X mod ScreenWidth, Y = OBJECT.Y mod ScreenHeight

    Making behaviour for such effect would be difficult. I can't think of any idea to make one object visible and being sensitive to collisions in four positions at once ><'.

    Edit:

    Oh, with these mod ScreenWidth and stuff it won't be easy (using "top Y position" etc. ^^. But once you'll figure out the events they'll be universal. gl hf :)

  • I think that what we need is wrappable layers. They would help with this and many other things, like infinite parallax backgrounds and such.

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