screwy scripts
This script is suposed to give dink a axe afterh e punches a chest and it opens but it never unfreezes so sombody please look and see wha i did wrong.
//script for chest with metas axe in
void main( void)
{
preload_seq(175);
}
void hit ( void )
{
freeze(1);
//play noise
int &hold = sp_editor_num(¤t_sprite);
playsound(7, 22500, 0, 0, );
if (&hold != 0)
{
//this was placed by the editor, lets make the chest stay open
editor_type(&hold, 4);
editor_seq(&hold, 175);
editor_frame(&hold, 4);
//type means show this seq/frame combo as background in the future
}
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
sp_seq(¤t_sprite, 175);
sp_script(¤t_sprite, "");
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
// get the axe
playsound(21, 50000, 0, 0, );
add_item("Item-axe, 438, 06");
wait(1);
say_stop("I GOTS METAS AXE", 1);
wait(1);
unfreeze(1);
}
//script for chest with metas axe in
void main( void)
{
preload_seq(175);
}
void hit ( void )
{
freeze(1);
//play noise
int &hold = sp_editor_num(¤t_sprite);
playsound(7, 22500, 0, 0, );
if (&hold != 0)
{
//this was placed by the editor, lets make the chest stay open
editor_type(&hold, 4);
editor_seq(&hold, 175);
editor_frame(&hold, 4);
//type means show this seq/frame combo as background in the future
}
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
sp_seq(¤t_sprite, 175);
sp_script(¤t_sprite, "");
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
// get the axe
playsound(21, 50000, 0, 0, );
add_item("Item-axe, 438, 06");
wait(1);
say_stop("I GOTS METAS AXE", 1);
wait(1);
unfreeze(1);
}