The Dink Network

Reply to Re: Missiles an' stuff

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:
 
 
December 23rd 2007, 07:46 PM
dinkdead.gif
You're saying they're both the same?
If a missile is both a melee and range attack then why say "In the case of missiles..."?

How this started was I thought it didn't make much sense for Dink to say something like "Ow I got splinters" when hitting a signpost if he hit it from across the screen or if a monster hit it, so I did this (which I found in some script):

void hit (void)
{
if (&enemy_sprite != 1) return;
if (&missle_source != 1) return;
//blabla
}

which works, but I don't know exactly how it works, and it's bugging me

I've been doing some testing...

(script attached to a signpost)
Dink will say "ouch" if sign is punched, "burn" if sign is shot, and nothing if a monster hits it.
void hit (void)
{
if (&enemy_sprite != 1) return;
if (&missle_source == 1)
{
say("Ouch, now I have splinters.", 1);
return;
}
say("Burn, signpost!", 1);
}

Now Dink says nothing if the sign is shot, otherwise the same.
void hit (void)
{
if (&missle_source != 1) return;
if (&missle_source == 1)
{
say("Ouch, now I have splinters.", 1);
return;
}
say("Burn, signpost!", 1);
}

So they can't be the same, but I'm still not sure what they are.
Sorry for rambling on a bit, I'm not much good at concise explanations