Page 1 of 1

Moving walls?

Posted: Tue Nov 01, 2011 7:16 am
by Helios
Ive seen like.. pros making moving walls on the sides of their screens but how do they do it ??

Re: Moving walls?

Posted: Tue Nov 01, 2011 1:52 pm
by AlexMdle
It's quite easy actually.

You need to set up several move joints that slide along the vertical side of the screen.

Add an event to all of them that activates if their move action is = 2.
As action, make it reset move action, frame and counter.

Also set extra parameters for each of those move joints

ex 1 = 7
ex 2 = (Distance you want the "wall" to extend)
ex 3 = 0
ex 4 = (How fast you want the "wall" to move)

Now comes the tricky part.

Each of those move joints should carry a segment of the wall.
Set move frame for each move joint to -(Nr of Move Joint(From second one on) * (ex 4 / Number of segments))

So, if you have 10 segments and ex parameter is = 100, you leave moveframe for first at 0, then set that of second one to -10, third to -20, fourth to -30 and etc.

Basically, each segment now takes 100 frames to reach it's destination, at which point they teleport back to their origin and move again.

By setting the time when each segment starts to move you basically create an even chain of wall segments that move along the sides of the screen. If there are gaps between the segments, you may want to make them longer.

Re: Moving walls?

Posted: Tue Nov 01, 2011 6:09 pm
by Scionox
Or you can use scrolling background walls + ewalls for damage, which is less laggy