Reply to Re: Complicated Dink C
If you don't have an account, just leave the password field blank.
So what makes missile brains special is that they have a damage procedure. This means that we can do:
//explosio.c
void main( void )
{
//set sequences and such
sp_seq(¤t_sprite, 70);
...
...
...
sp_brain_parm(¤t_sprite, 1);
//^this means it can't hit Dink
sp_nodraw(¤t_sprite, 1);
//make it invisible, most of the time
}
void damage( void )
{
int &my_brain = sp_brain(&missile_target, -1);
//missile_target is the thing hit by the missile, IIRC
if (&my_brain == 9)
{
int &get_x = sp_x(&missile_target, -1);
int &get_y = sp_y(&missile_target, -1);
sp_x(¤t_sprite, &get_x);
sp_y(¤t_sprite, &get_y);
//^Center it on target if target has monster brain
sp_nodraw(¤t_sprite, 0);
//^Make it visible if target has monster brain
}
}
//explosio.c
void main( void )
{
//set sequences and such
sp_seq(¤t_sprite, 70);
...
...
...
sp_brain_parm(¤t_sprite, 1);
//^this means it can't hit Dink
sp_nodraw(¤t_sprite, 1);
//make it invisible, most of the time
}
void damage( void )
{
int &my_brain = sp_brain(&missile_target, -1);
//missile_target is the thing hit by the missile, IIRC
if (&my_brain == 9)
{
int &get_x = sp_x(&missile_target, -1);
int &get_y = sp_y(&missile_target, -1);
sp_x(¤t_sprite, &get_x);
sp_y(¤t_sprite, &get_y);
//^Center it on target if target has monster brain
sp_nodraw(¤t_sprite, 0);
//^Make it visible if target has monster brain
}
}