The Dink Network

void hit( void )

January 1st 2005, 09:44 PM
spike.gif
It appears that brain 9 monsters with a void hit( void ) attack &enemy_sprite by default. (Ever noticed a bug that makes people attack you when hit by a fireball?)

My guestion is is there a way to override this or do something before the monster targets &enemy_sprite?
January 1st 2005, 10:08 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Well, to keep the monsters from actively attacking each other, I would always make sure they would go after Dink if they were ever hit, like this:

void hit()
{
if (&enemy_sprite == 1)
sp_target(&current_sprite, 1);
}

But that's probably not what you want. You could try experiementing with them targeting themselves or maybe 0.
January 2nd 2005, 05:06 PM
spike.gif
Though my guestion was more or less universal right now I'm trying to make some goblins and guards fight each other. I've got it to work fairly well but it could still work much better. :/ What annoys me is that if a goblin hits another goblin or a guard hits another guard they sometimes change their target.

Thanks for replying.
January 4th 2005, 03:28 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
How many goblins have you got on the screen? Is it a constant, fixed amount each time? If it's a number like 4 or so use some global variables... and assign each sprite's number to a global in their main function and use that to control the fights. Just an idea...