Reply to Re: New File: Dink Smallwood v1.08 - Release Candidate 5
If you don't have an account, just leave the password field blank.
AFAIK, hurt() doesn't call the hit-proc, so there's no infinite loop. I checked it by making a new global with the console, creating a new sprite with that global, adding the script and hurting it, but no hit() was ever executed.
I'm not sure why you created such a complicated example. I tried this:
void main(void)
{
hurt(¤t_sprite, 2);
}
void hit(void)
{
say("Hi", ¤t_sprite);
}
And it darn well looks like 'hurt' causes the hit function to run!
I also tried it the console way (though I didn't create a global, I just used the sprite number the create_sprite function returns), and it worked too.
Note: the console does support local variables (except you can never get rid of them), or you can just use the handy return value number above the console line to do things manually.
I'm not sure why you created such a complicated example. I tried this:
void main(void)
{
hurt(¤t_sprite, 2);
}
void hit(void)
{
say("Hi", ¤t_sprite);
}
And it darn well looks like 'hurt' causes the hit function to run!
I also tried it the console way (though I didn't create a global, I just used the sprite number the create_sprite function returns), and it worked too.
Note: the console does support local variables (except you can never get rid of them), or you can just use the handy return value number above the console line to do things manually.