Reply to Re: I Need help with a script...
If you don't have an account, just leave the password field blank.
Or even better, attach it to some object on the screen, put it in the main proc, right after sp_nodraw(¤t_sprite, 1); This makes it invisible. Type 2 in the editor won't work. For some strange reasons Type 2 sprites won't run scripts...
Then place the following code after it has done its job:
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
editor_type(&hold, 3);
}
sp_brain(¤t_sprite, 5);
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
sp_active(¤t_sprite, 0);
kill_this_task();
It's copied from some barrel script or something, but slightly modified. It makes the sprite disappear from the map forever, so it executes the code when you enter the screen and destroys itself, so it can never execute again.
Then place the following code after it has done its job:
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
{
editor_type(&hold, 3);
}
sp_brain(¤t_sprite, 5);
sp_notouch(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
sp_active(¤t_sprite, 0);
kill_this_task();
It's copied from some barrel script or something, but slightly modified. It makes the sprite disappear from the map forever, so it executes the code when you enter the screen and destroys itself, so it can never execute again.