Reply to Re: How to check what hit it
If you don't have an account, just leave the password field blank.
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!",¤t_sprite);
}
}
}
&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!",¤t_sprite);
}
}
}







