Colobot Wiki
Advertisement

Variables of this type contain the coordinates of a point in space. This type is made of three values that represent the x, y, and z coordinates.

x and y correspond to the place on the ground. The positive x axis faces towards east, the positive y axis faces towards north. 

The z value corresponds to the altitude above sea level. 

If you want to declare a variable of type point, you can write: 

	point a (10, 20, 30);

You can also set the variable taking one value after another:

	point b;
	b.x = 10;
	b.y = 20;
	b.z = 30;

With these examples, the following condition is true:

	if ( a == b )
	{
	}

The following declaration :

	point c (4, 7);

Is equivalent to :

	point c;
	c.x = 4;
	c.y = 7;
	c.z = 0;
Advertisement