What's wrong with this loop?
void hurt1_10( void )
{
&time = 10;
loop:
hurt(1, 1);
&time -= 1;
wait(1000);
if (&time < 1)
kill_this_task();
goto loop;
}
When I run this task, it hurts Dink for several points for a few seconds. So what's wrong??
{
&time = 10;
loop:
hurt(1, 1);
&time -= 1;
wait(1000);
if (&time < 1)
kill_this_task();
goto loop;
}
When I run this task, it hurts Dink for several points for a few seconds. So what's wrong??
I know you're *supposed* to be able to stack some commands, but I wouldn't risk it.
...
if (&time < 1)
{
kill_this_task();
}
...
(edit)
then try adding this in the loop-
say_stop(&time,1);
that way you know where its at.
Of course its easier to ALT-D and read the Debug log...
...
if (&time < 1)
{
kill_this_task();
}
...
(edit)
then try adding this in the loop-
say_stop(&time,1);
that way you know where its at.
Of course its easier to ALT-D and read the Debug log...
Um...
What is the script supposed to do? It looks like it works.
What is the script supposed to do? It looks like it works.
To deal 1 point of damage per second for 10 seconds on Dink. What it does, it deals more than 10 points of damage in 2 seconds or less.
EDIT: If it has anything to do with anything, the script runs when Dink touches a bonca. It's called by an external("hurt", "hurt1_10);
The script has other similar procedures too, like "hurt5_10" and "hurt10_20"
EDIT: If it has anything to do with anything, the script runs when Dink touches a bonca. It's called by an external("hurt", "hurt1_10);
The script has other similar procedures too, like "hurt5_10" and "hurt10_20"
TOUCH???
o.k. Ive had that prob. Dink keeps checking over and over to see if youre still touching the Bonca.
First line in the touch proc need to make the sprite no_touch. ( I forget... sp_touch(¤t_sprite,0); ??)
o.k. Ive had that prob. Dink keeps checking over and over to see if youre still touching the Bonca.
First line in the touch proc need to make the sprite no_touch. ( I forget... sp_touch(¤t_sprite,0); ??)
OMG, I can't believe I've been so stupid.. I've got a headache and the clock is 3:20 at night here, so I can always say that's the reason why I didn't figure that one out myself.
Thanks Ric!
Thanks Ric!