what
the hell is wrong with this script? It doesn't work. When Dink touches the hole, nothing happens. I switched places with this and another absolutely similar (except for the coordinates) script, and it worked. but this one doesn't. What's wrong?
void main( void )
{
preload_seq(452);
sp_touch_damage(¤t_sprite, -1);
sp_que(¤t_sprite, 1);
}
void touch( void )
{
if (&life < 1) return;
freeze(1);
sp_x(1, 410);
sp_y(1, 390);
sp_seq(1, 452);
sp_frame(1, 1);
sp_nocontrol(1, 1);
sp_touch_damage(¤t_sprite, 0);
sp_brain(1, 0);
wait(2000);
sp_brain(1, 1);
&player_map = 297;
sp_x(1, 490);
sp_y(1, 100);
load_screen();
draw_screen();
}
void main( void )
{
preload_seq(452);
sp_touch_damage(¤t_sprite, -1);
sp_que(¤t_sprite, 1);
}
void touch( void )
{
if (&life < 1) return;
freeze(1);
sp_x(1, 410);
sp_y(1, 390);
sp_seq(1, 452);
sp_frame(1, 1);
sp_nocontrol(1, 1);
sp_touch_damage(¤t_sprite, 0);
sp_brain(1, 0);
wait(2000);
sp_brain(1, 1);
&player_map = 297;
sp_x(1, 490);
sp_y(1, 100);
load_screen();
draw_screen();
}
Put a script_attach(1000) between the sp_brain(); and the &player_map:
sp_brain(1, 1);
script_attach(1000);
&player_map = 297;
oh, and the return after the if (&life < 1) shoud be on a new line.
sp_brain(1, 1);
script_attach(1000);
&player_map = 297;
oh, and the return after the if (&life < 1) shoud be on a new line.
only thing i can think of is try
sp_touch_damage(¤t_sprite,0);
wait(10);
whatever else
sp_touch_damage(¤t_sprite,0);
wait(10);
whatever else
oh yeah, when you change screens, normal scripts die. attaching the script to 1000 is like a spawn, that survives screen change. but then you have to get rid of it too.
they look funky with screen changes. like it fades down, then goes away for a split second when it changes map or something weird like that. if you look in anarchy halloween party, i actually made a black sprite stretch and cover the screen to prevent that.