Reply to Re: some help with treasure chests
If you don't have an account, just leave the password field blank.
March 3rd 2005, 08:26 AM
sir akn
here you are:
//script for chest with 500 gold in it
void main( void)
{
preload_seq(177);
}
void hit ( void )
{
//play noise
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
//this was placed by the editor, lets make the chest stay open
editor_type(&hold, 4);
editor_seq(&hold, 177);
editor_frame(&hold, 6);
//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);
external("make", "gold500")
sp_seq(¤t_sprite, 177);
sp_script(¤t_sprite, "");
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
}
//script for chest with 500 gold in it
void main( void)
{
preload_seq(177);
}
void hit ( void )
{
//play noise
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
//this was placed by the editor, lets make the chest stay open
editor_type(&hold, 4);
editor_seq(&hold, 177);
editor_frame(&hold, 6);
//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);
external("make", "gold500")
sp_seq(¤t_sprite, 177);
sp_script(¤t_sprite, "");
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
}