In C Sript I have:
while (my.health > 0)
{
// move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
c_move (my, vector(20 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0), nullvector, GLIDE);
if (mouse_left == on) // if the player presses the left mouse button
{
wait(-0.1);
fire_bullets(); // call this function
}
If I replace if(mouse_left == on) with if(mouse_left)
as the manual suggests, my function, fire_bullets() doesn't run. If I replace it with if(1), the gun fires continously, so I know the code around it is good.
Any ideas please ?
Thanks