I'm still having problems with this. I'm not sure what I'm doing wrong. Basically, I want to be able to select stuff in a 3D environment. For example, if there's a tree in the distance, when the mouse cursor hovers over it then the tree will light up or words will come on the screen.
A snippet of what I've done:
Code:
text contact_text
{
font = standard_font;
layer = 10;
pos_x = 350;
pos_y = 100;
size_y = 70;
offset_y = 0;
flags = center_x, narrow, visible;
}
string str1 = "The mouse is touching the tree. \n Testing the text now. \n testing the line breaks also! loading.....";
function mouse_test()
{
temp.x = MOUSE_POS.x;
temp.y = MOUSE_POS.y;
temp.z = MOUSE_POS.Z;
vec_for_screen(temp, camera);
if((temp.x == tree.x) && (temp.y == tree.y) && (temp.z == tree.z))
{
contact_text.string = str1;
}