Page 1 of 1

Text Edit Question

Posted: Thu Jun 26, 2008 2:37 pm
by Sasadad
Ok, if you go into test edit it says at the top

Code: Select all

name, x, y, degrees, xscale, yscale, parent, part#
which should tell what each number in the text below means. If I have a part shown as:

Code: Select all

rightTri, -4, 25, 180, 1, 1, e7, 8, 0066FF
then that means it whould be located at (-4,25), should be rotated 180 degrees, be size 1x1(if you don't realize that 1=size 100), have part 7 as its parent and (I'm guessing, it isn't up there) be color 0066FF.

However, if this is actually talking about part number 8, it is actually located at (450,200) and it is size 100. Everything else is right.

It should say color at the end now that color has been added. I realize that 1=100 just as 0.5=50, but maybe this should be made more clear somewhere. However, how does (-4,25)=(450,200)?

Posted: Thu Jun 26, 2008 5:15 pm
by MD
I'll add the colour label to the top.

Indeed the scale is *100 if you want a percentage.

The position is relative to its parent, whose position is relative to its parent, and so on until it gets back to the core. Try having just 1 part attached to the core and add up the two x coordinates, they will equal the x value shown in the properties window. I did it this way because once the game starts these x,y values are used to get an angle, in radians, and a radius (or "hypotenuse" if you like) between the part and its parent.

~MD

Posted: Thu Jun 26, 2008 5:17 pm
by swartzer
I haven't used the editor in a while, so I had to go back and look, but x and y in the text editor are actually offsets from the parent. In your example, is the parent located at 454,175? The graphical editor looks like it calculates the absolute coordinates and displays them in the info box, but I'm guessing that the text editor is the internal representation that the game uses, and is relative.

Also, scale is a multiplier on the default part size, not a specific number of pixels. If a part is normally 100 pixels tall and wide, a scale of 1 does equal 100 pixels. But if a part were normally 200 pixels, a scale of 1 would equal 200 pixels. So with an scale of 2 you aren't saying "200 pixels", you're saying "twice as many pixels as normal". The graphical editor displays xscale and yscale as percentages in the info box.