The Dink Network

Arrows sticking in a shadow, what's going wrong?

June 27th 2003, 04:53 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I'm currently making a cave which is very dark, and if you hit a stone with an arrow, the darkness should go away. One problem: The arrows keep sticking in the darkness sprite
(a LOT of seq 30 frame 3 tiled in paint and saved it as another pic my-12.bmp).
Here are the Dink.ini lines of it:

load_sequence_now graphics\my- 850
SET_SPRITE_INFO 850 12 1 1 -1 -1 1 1

And this is the script attached to the object that creates the shadow:

void main( void )
{
sp_pseq(&current_sprite, 1);
sp_pframe(&current_sprite, 1);
int &crap;
int &xie = sp_x(&current_sprite, -1);
int &yie = sp_y(&current_sprite, -1);
&crap = create_sprite(&xie, &yie, 0, 850, 12);
sp_que(&crap, 1000);
&shadow = &crap;
sp_brain(&crap, 15);
sp_brain_parm(&crap, &current_sprite);
sp_nohit(&crap, 1);
}

(partially stolen from lantern scripts)

I can see the darkness floating above everything, but when I shoot with the bow, the arrow will just stick in the shadow.
What is wrong???
June 27th 2003, 05:04 AM
farmer.gif
are you sure the hardness is turned off on the shadow?
June 27th 2003, 05:24 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I now've added

sp_hard(&crap, 1);
draw_hard_sprite(&crap);

but the problem still occurs... Anyone?
June 27th 2003, 05:49 AM
farmer.gif
dunno if this has anything to do with it, but try taking out &shadow = &crap;
June 27th 2003, 09:48 AM
old.gif
The darkness IS a sprite, if hardness is removed you will still hit it ( you can hit moving sprites too, or not? humans, etc.. )

im not sure how to fix it, but you COULD try this:

set the darkness brain to 15, I never used darkness before, and its only a guess...
June 27th 2003, 09:44 PM
anon.gif
Hugmungustes
Ghost They/Them
 
Put this in the script of the shadow in the main procedure

sp_nohit(1);
June 28th 2003, 05:19 AM
custom_odd.gif
Yep, the hugmung is right. You don't even need a script on the big darkness sprite, just pick it up in the editor and set the nohit to 1. Should fix it.
June 29th 2003, 10:05 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Ehm... You didn't quite read the post and the script. Its a thing that creates his own shadow, which has a hardbox of 3*3.
But I've fixed the problem already. It wasn't the shadow though, but I simply rescripted the whole thing and it works now. Thanks for your help anyway.