Arrows sticking in a shadow, what's going wrong?
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(¤t_sprite, 1);
sp_pframe(¤t_sprite, 1);
int &crap;
int &xie = sp_x(¤t_sprite, -1);
int &yie = sp_y(¤t_sprite, -1);
&crap = create_sprite(&xie, &yie, 0, 850, 12);
sp_que(&crap, 1000);
&shadow = &crap;
sp_brain(&crap, 15);
sp_brain_parm(&crap, ¤t_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???
(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(¤t_sprite, 1);
sp_pframe(¤t_sprite, 1);
int &crap;
int &xie = sp_x(¤t_sprite, -1);
int &yie = sp_y(¤t_sprite, -1);
&crap = create_sprite(&xie, &yie, 0, 850, 12);
sp_que(&crap, 1000);
&shadow = &crap;
sp_brain(&crap, 15);
sp_brain_parm(&crap, ¤t_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???
I now've added
sp_hard(&crap, 1);
draw_hard_sprite(&crap);
but the problem still occurs... Anyone?
sp_hard(&crap, 1);
draw_hard_sprite(&crap);
but the problem still occurs... Anyone?
dunno if this has anything to do with it, but try taking out &shadow = &crap;
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...
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

Hugmungustes


Put this in the script of the shadow in the main procedure
sp_nohit(1);
sp_nohit(1);
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.
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.
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.