Wrap behaviour

New releases and general discussions.

Post » Mon Sep 22, 2008 5:03 pm

Is it possible to make the wrap behaviour do this:

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.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Mon Sep 22, 2008 6:02 pm

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 :)
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Tue Sep 23, 2008 3:14 pm

I think that what we need is wrappable layers. They would help with this and many other things, like infinite parallax backgrounds and such.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests