The Dink Network

another bug......

April 23rd 2003, 09:57 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
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?
April 23rd 2003, 11:06 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
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.
April 23rd 2003, 11:58 PM
wizardg.gif
Paul
Peasant He/Him United States
 
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?
April 24th 2003, 05:24 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Today hurt(&current_spite,40); works fine.
Hmh.
Mabey because I'm now useing external to get to it. Mabey this machine is posessed.
Mwahahahaha.