another bug......
I need this lightning bolt to damage people;
int &stkx = sp_x(&current_sprite,-1);
int &stky = sp_y(&current_sprite,-1);
&stkx += 10;
&stky -= 33;
int &bolt = create_sprite(&stkx,&stky,0,960,1);
sp_touch_damage(&bolt,55);
sp_que(&bolt,200);
sp_range(&bolt,40);
sp_seq(&bolt,960);
sp_kill(&bolt,600);
It looks good, but does not do the damage. I also tried hurt(&current_sprite,50); but it crashed. Anyone see somethin' wrong here?
int &stkx = sp_x(&current_sprite,-1);
int &stky = sp_y(&current_sprite,-1);
&stkx += 10;
&stky -= 33;
int &bolt = create_sprite(&stkx,&stky,0,960,1);
sp_touch_damage(&bolt,55);
sp_que(&bolt,200);
sp_range(&bolt,40);
sp_seq(&bolt,960);
sp_kill(&bolt,600);
It looks good, but does not do the damage. I also tried hurt(&current_sprite,50); but it crashed. Anyone see somethin' wrong here?
I'm pretty sure touch damage only affects Dink... it doesn't harm other sprites at all.
Its weird how hurt(&current_sprite, 50); crashed Dink... I think I remember hurt crashing for negative values, but never positive ones. Try using different values (instead of 50) or tossing a couple wait(100); commands in there and see if that makes a difference.
Its weird how hurt(&current_sprite, 50); crashed Dink... I think I remember hurt crashing for negative values, but never positive ones. Try using different values (instead of 50) or tossing a couple wait(100); commands in there and see if that makes a difference.
You could also try strength instead of touch_damage, and then give it a missile brain (11 or 17). But that will likely result in it getting hit several times. And as redink1 said, it's odd that it should crash; I've never had problems with hurt() crashing before. Could it be that it works correctly but when the thing dies/gets hit that crashes it?