With this in mind, this set of techniques is designed to help new designers create visual effects that are difficult to idealize, and even harder to implement. We will go through a step-by-step procedure to create amazing visuals in Zeta Flow.
Stopping Rotation
If you have played around in the editor, you know there is no command to actually get a piece to stop rotating. In my searches through the level database, I have found some interesting levels. They had the parts seem to stop rotating. The first of this type of level I played was by TestUser. It is called Absolute Defender. Take a look at this level if you haven't already, and you will see what I mean when I say that rotating pieces seem to stop.
We are going to recreate this effect in today's thread. It definitely won't look as good as TestUser has made his levels look, but it will give you a base to work with in order to use this technique in your levels.
First of all, we need a few pieces:
Basic set of pieces for this technique.
You will notice here, that there are two sets of pieces. One set contains two orbs, and a platform. The other set contains one orb and two platforms.
The code for this example is actually quite easy, although it can take a bit of time to figure out. You will need three rotation script calls. The script call we will be focusing on here, is the RotatePart script call. Here is the syntax:
rotatePart, part #, speed, minimum angle, maximum angle, starting angle
Angles are in degrees, as opposed to radians. This makes it a bit easier to figure out the proper angles. Also, if you put in 0 for both the minimum and maximum angles, it will rotate in a circle indefinitely.
Also, you can add more platforms to each of the orbs. Just remember, in order for this to work with multiple platforms, you will need to keep the linking in the right order. The platforms attached to orb #2 are the ones that block the lanes into the core. The platforms attached to orb #3 make the lanes into the core itself.
Here's the code:
Code: Select all
rotatePart, 1, 1.5, 0, 0, 0
rotatePart, 2, -1, -90, 90, 0
rotatePart, 3, .5, 0, 0, 0
As you can see, three script calls is all it takes to makes this actually work properly. Once you have this code in place, make your level look like this:
The highlighted piece is attached to orb #2
Go ahead and test play your level to see how it looks.
Now that that is finished, let's dissect our code.
Code: Select all
rotatePart, 1, x, 0, 0, 0
rotatePart, 2, y, -90, 90, 0
rotatePart, 3, z, 0, 0, 0
The first script call rotates part #1 in a clockwise cirle starting at 0 degrees, and continues this way indefinitely. The same thing goes for the rotate call for part #3.
The key factor here is the second rotate call. What this call does is rotates the #2 orb from -90 degrees to 90 degrees. It starts at 0 degrees in order to keep the alignment of all the pieces. Once it hits one end of the minimum/maximum angles, it switches directions. It will continue to do this indefinitely.
The relationship between x, y, and z is what really makes this do exactly what we want it to do. If you notice, in the example above, x= 1.5, y= -1, and z= .5. The relationship from a mathematical standpoint is as follows:
abs(x) - abs(y) = abs(z)
abs(1.5) - abs(-1) = abs(.5)
This is because we want the contributing factor to be the removal of unwanted rotation from the level itself. If the value of z equals the value of x - y, then we are on the right path. To see just how effective this is, go ahead and input some numbers of your choosing. You can use numbers that don't add up properly to see the effect it has on making the level work properly.
A few values to try so you can see how it works:
x=2, y=-1, z=1 This example fits the criteria to remove rotational motion.
x=3, y=-1, z =1 This example does not fir the criteria to remove rotational motion.
One last thing to note before I leave you for today. The y value needs to be the opposite sign of the x and z values. This allows it to rotate against the flow of the rotation. If you want it all to be rotating slower, simply lower the values while keeping them consistent. If you want the blocking portion to move slower, lower its speed value while increasing the z value or lowering the x value to keep things in order.
Most importantly, play around with this and have fun with it. Experiment with it. Figure our new and interesting applications for it.
Edit: You can view a working model of this effecthere.