The Dink Network

Reply to Re: Local variable problem

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 7th 2009, 08:05 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Was the original dragon also broken in 1.07? In that case we'd need to look into it again.

Can't you use something like this?

void main (void)
{
int &stun = 0;
int &stunduration = 0;

checkstatus:
 
if (&stun == 1)
{
wait(100);
if (&stunduration > 0)
{
freeze(&current_sprite);
&stunduration -= 1;
}
else
{
&stun = 0;
unfreeze(&current_sprite);
}
}

goto checkstatus;
 
}
 
void hit (void)
{
 
&stun = 1;
&stunduration = 20;
goto checkstatus; 
}


Obviously this won't work if you hit very fast in a row either, but maybe you could change the wait(100); value into something lower (Under 30 or so should definitely work).