This is what I am trying to do:
A model of a candle is in the game.
Unligt is ticked in the properties. So the model is dark.
I have added some text, that shows when the candle are touched, and that works fine....
But this dont.....
What I whant is the player
touch with mousepointer and
left click with mouse and
then the candle will be lighted up setting the ambient to 100.
Problem is that it takes forever to react. I click on the candle and I have to click many times and some times it works and some time it dont.
Does any of you have any suggestion on how to make it react faster? I whant the candle to get ambient to 100 as soon as the mouse is clickedfunction display_light()
{
set (message_txt, VISIBLE);
wait (-1);
reset (message_txt, VISIBLE);
if(mouse_left)
{
if(mouse_ent)
{
my.ambient = 100;
}
}
}
action lyse_stake()
{
set(my,PASSABLE);
my.emask |= (ENABLE_TOUCH);
my.event = display_light;
}
////mouse/////
function mouse_startup()
{
mouse_mode = 2;
//mouse_range=5000;
mouse_map = bmp_mouse_ptr;
while (1)
{
vec_set(mouse_pos, mouse_cursor);
wait(1);
}
}
/////////////