0 Favourites

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.

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,485
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[Behavior] LiteTween
672 169,867
manujorgo's avatar
manujorgo
Unread hot topic
564 105,203
rexrainbow's avatar
rexrainbow