The Dink Network

Remove the obstacle

July 27th 2004, 11:21 AM
anon.gif
Vedran
Ghost They/Them
 
I have a fence with a door opening which is barred by two non-hard spears and invisible hard table (as other scripts I saw do it).

At one point, when the global becomes 4, Dink, when he arrives before the blockade, should say "Time to go through" and all three sprites should disappear forever, freeing the way.

I tried to "sp_kill" it; I tried "sp_hard(&current_sprite, 1)" with "draw_hard_sprite", I tried moving it with "sp_x" with "sp_y"...
And *nothing* works. Spears are removed, though, but table (or its hardness) is there.

How do you do that? Should I use inside_box or touch or talk or what?
July 27th 2004, 11:36 AM
anon.gif
MiloBones
Ghost They/Them
 
I don't know why this works for me, but you could try making the table not hard in the editor, then set it's hardness entirely in the script with draw_hard_sprite and draw_hard_map... of course, you were probably doing that already.
July 27th 2004, 12:07 PM
spike.gif
If the script is attached to the table properly, then simply

sp_active(&current_sprite, 0);
editor_type(&current_sprite, 1);
draw_hard_sprite(&current_sprite);

should make the hardness go away and kill the table forever.
July 28th 2004, 12:21 PM
anon.gif
Vedran
Ghost They/Them
 
It works when I set its type to person/creature. If it is invisible, it doesn't work.
(I work with windinkedit.)
July 29th 2004, 05:35 AM
slayer.gif
MadStalker
Peasant He/Him Finland
tag line 
Just put sp_nodraw(&current_sprite, 1); in the sprite's main proc.
July 29th 2004, 05:57 AM
anon.gif
Vedran
Ghost They/Them
 

Works fine now! Thanks.