The Dink Network

Reply to Re: How to check what hit it

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:
 
 
September 17th 2006, 08:54 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
You'll have to use compare_weapon, but also &missle_source. Yes, &missle is spelled incorrectly, but that's the Seth way of doing things.

&enemy_sprite will return 1 when hit by a missile.
&missle_source will return the missle number when hit by a missile. Otherwise, it'll return the attacker.

void hit( void )
{
if (&missle_source == 1)
{
int &crap = compare_weapon("item-sw1");
int &crap2 = compare_weapon("item-sw2");
int &crap3 = compare_weapon("item-sw3");
int &swordarmed = 0;
if (&crap == 1)
{
&swordarmed = 1;
}
if (&crap2 == 1)
{
&swordarmed = 1;
}
if (&crap3 == 1)
{
&swordarmed = 1;
}
if (&swordarmed == 1)
{
say("Ouch! That's a sword!",&current_sprite);
}
}
}