The Dink Network

Time for &life to go down

November 22nd 2007, 10:37 AM
dinkdead.gif
I'm trying to make something happen while Dink is dying, ie. while his healtbar is emptying, but of course &life goes down instantly so something like this:

&life = -1;
loop:
//stuff
if (&life < 10)
goto done;
goto loop;
done:

won't work, it just goes straight out.

Is there a way I can do this without just using using a wait(); ?
November 22nd 2007, 10:39 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Is there any reason why you'd not want to use a wait() then?
November 22nd 2007, 10:46 AM
dinkdead.gif
Because if I use wait(longtime); and Dink only has 10 or so health then there'll be a long ugly pause.

I suppose I could use a load of "if"s to find out how much health he has and base the waiting time on that...
Does anyone know how fast the healthbar goes down?
November 22nd 2007, 11:14 AM
spike.gif
Maybe you could do it like this:

loop:
&life -= 9;
//stuff
if (&life < 10)
goto done;
wait(500);
goto loop;
done:

You're going to have to have some kind of pause between loop: and goto loop; anyway or the game will just crash.
November 22nd 2007, 01:20 PM
dinkdead.gif
Already done more or less the same, thanks though! Much easier than my first idea.

There are wait()'s included in "stuff" anyway.