I opened scipt of workshop (script14_2.c)
I see that two wizards are glowing when you put a cursor on it.
But I dont know a code. :|
Where exactly said that wizards selected??I cant see a line about wizards.?
Iam new.
unction highlight_event()
{
if (event_type == EVENT_TOUCH) // the wizard was touched with the mouse?
{
my.ambient = 100; // the make it look bright
my.lightrange = 200; // and generate light on a radius of 200 quants!
}
else // the wizard isn't touched anymore
{
if (event_type == EVENT_RELEASE) // the mouse was moved away from it?
{
my.ambient = 0; // then restore its initial ambient value (zero)
my.lightrange = 0; // and stop it from generating light around it
}
}
}
action wizard_lights() // this action is attached to both wizards
{
// make the wizard models sensitive to mouse touching and releasing
my.emask = ENABLE_TOUCH | ENABLE_RELEASE;
// run function highlight_event the wizards are touched or released
my.event = highlight_event;
}
function main()
{
video_screen = 1; // start in full screen mode
video_mode = 7; // use a screen resolution of 800 x 600 pixels
level_load ("work14_2.wmb"); // load the level
mouse_mode = 1; // show the mouse pointer
mouse_map = cursor_pcx; // set the mouse pointer bitmap
while (1)
{
mouse_pos.x = mouse_cursor.x; // allow the mouse pointer to move
mouse_pos.y = mouse_cursor.y; // on the x and y axis
camera.pan -= mouse_force.x;
camera.tilt += mouse_force.y;
wait (1);
}
}