Reply to Re: Touch with other sprites than Dink.
If you don't have an account, just leave the password field blank.
Try the missile brain. It would come out something like this. Take note that it will change its direction when it hits something outside of its defined boundaries (I assume you have it going back and forth between two walls or something)
Btw if you ever want an enemy sprite to be affected by 'touching' another sprite, using the missile brain is the way to go.
Btw if you ever want an enemy sprite to be affected by 'touching' another sprite, using the missile brain is the way to go.
void main(void)
{
int &x = 0;
sp_brain(¤t_sprite,11);
sp_strength(¤t_sprite,20);
sp_touch_damage(¤t_sprite, -1);
sp_speed(¤t_sprite, 5);
sp_dir(¤t_sprite,6);
roll:
&x = sp_x(¤t_sprite,-1);
If(&x >= 400)
{
sp_dir(¤t_sprite,4);
sp_seq(¤t_sprite,854);
}
if (&x <= 160)
{
sp_dir(¤t_sprite,6);
sp_seq(¤t_sprite,856);
}
}
void touch(void)
{
sp_touch_damage(¤t_sprite, 0);
freeze(1);
&life = 0;
wait(100);
sp_que(1, -1);
}
void damage(void)
{
goto roll;
}






