do you know that if you double click with your walk button you can see your player "RUN".
so can someone tell me how can you double click to make your player run?
please?
You've forgotten the magic word. :cool:
please?
BINGO !!!
To detain a double click of the mouse I would do something like this :
// GlobalScript.ash
#define MOUSE_DOUBLECLICK_RATE 10 // Double click delay
// GlobalScript.asc
// top of the script
int double_click;
function repeatedly_execute()
{
// DoubleClick recognizer
if (double_click > MOUSE_DOUBLECLICK_RATE)
{
double_click = 0;
}
else if (double_click)
{
double_click ++;
}
}
function on_mouse_click(MouseButton button)
{
if (button == eMouseLeft)
{
if (!double_click)
{
// user performed a Single click (walk)
double_click ++;
}
else
{
// user performed a Double Click (run)
}
ProcessClick(mouse.x,mouse.y, mouse.Mode);
}
}
Not tested, however I think there are several ways to achieve that.
I hope it could give you the idea.
repeatedly_execute() ? :confused:
GlobalScript.asc(78): Error (line 78): Variable 'repeatedly_execute' is already defined
this is bad.
Yes, Indeed.
The function repeatedly_execute() is already defined in the GlobalScript.
You will have to copy the inside of the repeatedly_execute that I wrote and paste it to the Global one.
Same for the function on_mouse_click.
However, in every each room, you can have a different repeatedly_execute from the Global one.
If you need that for a room only, paste everything to a room script.
but where and how?
can you tell me this easy?
I am not sure how to explain that easily.
If you can post your 'GlobalScript' here, I can show you where you will need to do that.
I think I already did.
Nope, you didn't.
It sounds like you're just starting out with AGS. You should begin by having a look at the manual that comes with it (under the Help menu) â€" you can also find it here (http://www.adventuregamestudio.co.uk/manual/) (slightly out of date, but it shouldn't matter). Go through the tutorial and have a look at the introduction to scripting. (The most relevant bit is here: http://www.adventuregamestudio.co.uk/manual/ags43.htm#repexec)
Making a game is not something that can be done without effort, so we expect people to do a little bit of studying before you come here asking questions.