just a quick question.
when i run the following function:
[code]
function movechar()
{
if(player != NULL)
{
posidon.x = mouse_pos.x;
posidon.y = mouse_pos.y;
posidon.z = 0;
vec_for_screen(posidon,camera);
posidon.x += camera.x;
posidon.y += camera.y;
vec_set(player,posidon);
}
}
[code\]
quick description:
(posidon vector has been predefined)
if the player pointer has been set to an entity,
it sets the mouse coordinates to the posidon vector.
it then turns this into world coordinates and adds the camera position. it then moves the player to this position, e.g
(this function is triggered by a mouse click)
you click somewhere, and the player goes there
note that the camera is already looking down the z axis.
now, the problem is that when the containing script compiles, i get the error "'x': is not a member of 'function'" on the first posidon line. i have no idea what this means, as posidon is a variable, not a function.
the definition of posidon follows:
var posidon = vector(0,0,0);
any help is greatly appreciated,