episch, thank you very much for your help. Unfortunately, I haven't succeeded.
Is not working by no means. WHAT is wrong in my code?
I uploaded the entire project files. I also let the code concerning with the joystick navigation, in order to assure this is not the problem.
I tried to modify "mouse_range" with differents values. The some thing, is not working.
http://uploading.com/files/bf432aa3/mouse_press.zip (you will have to wait about 50 seconds to download the zip archive )
Bellow is the code
#include <acknex.h>
#include <default.c>
STRING* aloha_str = "You clicked on earth!";
TEXT* greetings_txt =
{
pos_x = 300;
pos_y = 250;
string (aloha_str);
flags = SHOW;
}
function click_event()
{
if(event_type == EVENT_CLICK)
{
set(greetings_txt, SHOW);
}
}
action planet_act()
{
my.emask |= ENABLE_CLICK;
// my.enable_click = on;
my.event = click_event;
}
function main()
{
level_load("small.hmp");
ent_create("earth.mdl", vector(80, 80, 20), planet_act);
video_mode = 9;
mouse_range=400;
reset(greetings_txt, SHOW);
while(1)
{
camera.y -= joy_force.x;
camera.x += joy_force.y;
if (joy_4)camera.pan+=0.3;
if (joy_5)camera.pan-=0.3;
if (joy_1) camera.z += 1;
if (joy_2) camera.z -= 1;
if (joy_1 && joy_2)
{
camera.x = 0;
camera.y = 0;
camera.z = 0;
}
wait(1);
}
}
Thank you guys.