hi to everybody,
I desire to have in my game
a mouse that click with the left key every 5 seconds,
I use ags 2.72 and me I have begun this way:
/ / room script file
int OverF;
int OverQ;
int LioScore;
int HioScore;
string FScore;
string QScore;
function LioGoal () {
QioScore++;
StrFormat (QScore, "cycle% d",QioScore);
SetTextOverlay(OverQ,100,61,300,0,0,QScore);
}
function HioGoal () {
FioScore++;
StrFormat (FScore, "second:% d",FioScore);
SetTextOverlay(OverF,100,21,300,0,0,FScore);
}
/ / script for Room: Player enters room (after fadein)
HideMouseCursor ();
FioScore=0;
QioScore=5;
OverQ=CreateTextOverlay(100,21,300,0,0, "");
OverF=CreateTextOverlay(100,21,300,0,0, "seconds: 0");
}
/ / script for Room: Repeatedly execute
ShowMouseCursor ();
LioGoal ();
if (QioScore==39){QioScore=0;HioGoal ();}
if (FioScore==5){FioScore=0;......................................????????}
}
I don't know whether to end.
Can you help me kindly?
thanks
What do you mean? You want the player to click every 5 seconds? What happens if they don't?
It's not clear what you are trying to do.
hello Chris,
the file .exe AGS not work with the click of the mouse with HeadMouse,
I wanted to create a click the left mouse button automatically
every 5 seconds, I use AGS 2.72.
thanks
// global script header
import function on_mouse_click(MouseButton button);
// room script file
int timer;
// inside room's Repeatedly execute
timer++;
if (timer > GetGameSpeed()*5) { // 5 seconds
timer=0;
on_mouse_click(eMouseLeft);
}
thanks KhrisMUC