The Dink Network

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.
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:
 
 
January 28th 2006, 07:43 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
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(&current_sprite, 2);
}

void hit(void)
{
say("Hi", &current_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.