Remove the obstacle
July 27th 2004, 11:21 AM

Vedran


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(¤t_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?
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(¤t_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

MiloBones


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.
If the script is attached to the table properly, then simply
sp_active(¤t_sprite, 0);
editor_type(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
should make the hardness go away and kill the table forever.
sp_active(¤t_sprite, 0);
editor_type(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
should make the hardness go away and kill the table forever.
July 28th 2004, 12:21 PM

Vedran


It works when I set its type to person/creature. If it is invisible, it doesn't work.
(I work with windinkedit.)
(I work with windinkedit.)
Just put sp_nodraw(¤t_sprite, 1); in the sprite's main proc.