11th November 2003, 07:48
Ok, i is a line from zero to one, but how do you make a multi point line that changes directions at any given point???
Thanx in advance
11th November 2003, 07:50
11th November 2003, 08:17
i think i know what you mean.... This isnt very tricky, you should try playing around with it yourself before asking here. But still, we are happy to assist. Anyways...
The easiest way to do what you are talkng about is to make a scope that only has the amount of points that you need to make your shape. Then, you just count the point you are up to (in the per point code), and specify it a position.
Try doing this:
per frame: p=0
+ equal(p,5)*-0.5; //this is all one line of code
you can just copy and paste each of those into the appropriate superscope code box, and youll find that it makes a square. (make sure "draw as dots" isn't ticked)
The variable 'p' is used to count which point you are up to. And it is reset to 0 every frame so that it doent just keep on going over time.
Then you set the position according to what number p you are up to.
simple as that.
just a side note, you can change i all you want aswell. 2*i-1 is very commonly used, as it stetches i from -1 to 1, which are the boundaries of the avs screen on both axes.
you could manipulate i on both axes by doing this sort of thing in the per point section:
you'll see that the line changes direction at the half way point of i.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.