Reply to Re: reaction time DMOD
If you don't have an account, just leave the password field blank.
Basicly the script works as follows:
I have a global called &early.
In the main script this is the idea:
spawn("early");
loop:
&early = 2;
wait(<a random amount of time> );
if (&early == 3)
goto loop;
&early = 1;
*the rest of the script*
The script attached to the script early is:
void main( void )
{
loop:
wait(50); //to prevent it from chrashing because the wait(); command is to short. (as Chrispy just mentioned)
wait_for_button();
if (&early == 4)
kill_this_task();
if (&early == 2)
&early = 3;
goto loop;
}
When I run this it just doesn't look like it does anything, it won't go back to the loop when I press the button early. (or perhaps it returns only once, I'm not sure... (But this seems illogical too)) So I blamed it on the limitation of the dinkengine not being able to run two scripts at a time. Both scripts have a wait(); command so it shouldn't be a problem, but it is...
I'm thinking of not fixing the bug and release it anyway untill someone finds a fix. This shouldn't be a mayor pain, because it's unlikely that you would have much (unfair) advantage from using this problem anyway. (and having a disadvantage is impossible so...)
I have a global called &early.
In the main script this is the idea:
spawn("early");
loop:
&early = 2;
wait(<a random amount of time> );
if (&early == 3)
goto loop;
&early = 1;
*the rest of the script*
The script attached to the script early is:
void main( void )
{
loop:
wait(50); //to prevent it from chrashing because the wait(); command is to short. (as Chrispy just mentioned)
wait_for_button();
if (&early == 4)
kill_this_task();
if (&early == 2)
&early = 3;
goto loop;
}
When I run this it just doesn't look like it does anything, it won't go back to the loop when I press the button early. (or perhaps it returns only once, I'm not sure... (But this seems illogical too)) So I blamed it on the limitation of the dinkengine not being able to run two scripts at a time. Both scripts have a wait(); command so it shouldn't be a problem, but it is...
I'm thinking of not fixing the bug and release it anyway untill someone finds a fix. This shouldn't be a mayor pain, because it's unlikely that you would have much (unfair) advantage from using this problem anyway. (and having a disadvantage is impossible so...)