Reply to Script Troubles
If you don't have an account, just leave the password field blank.
So, I've got this problem, you see. I've got a boss, and when he dies (HP = 0) in the die() procedure I've spawned the script, and it spawns. This is the spawned script:
// Spawned when boss (cave - level 1) dies.
void main ( void )
{
freeze(1);
freeze(¤t_sprite);
say("`2NO! NO!! NOOOooo...", ¤t_sprite);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &boom = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2*Snap* *Pop* *Bang*", ¤t_sprite);
int &boom2 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom2, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2It seems I under-", ¤t_sprite);
int &boom3 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom3, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2I underestimated you, Smallwood...", ¤t_sprite);
int &boom4 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom4, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2NOOOooo...",, ¤t_sprite);
int &boom5 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom5, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
sp_active(¤t_sprite, 0);
}
The loads of magic rings blow up, but the boss instantly plays the die seq, and doesn't say anything.
I think what's wrong is, when an enemy reaches 0 HP, as well as the die() procedure running, the enemy plays the die seq and deactivates, or something. So, since it deactivates, it can't say anything, therefore, well, it doesn't say anything. Any help?
// Spawned when boss (cave - level 1) dies.
void main ( void )
{
freeze(1);
freeze(¤t_sprite);
say("`2NO! NO!! NOOOooo...", ¤t_sprite);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &boom = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2*Snap* *Pop* *Bang*", ¤t_sprite);
int &boom2 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom2, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2It seems I under-", ¤t_sprite);
int &boom3 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom3, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2I underestimated you, Smallwood...", ¤t_sprite);
int &boom4 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom4, 167);
playsound(24, 22050, 0, 0, 0);
wait(1000);
say("`2NOOOooo...",, ¤t_sprite);
int &boom5 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom5, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
int &boom6 = create_sprite(&save_x, &save_y, 7, 167, 1);
sp_seq(&boom6, 167);
playsound(24, 22050, 0, 0, 0);
wait(200);
sp_active(¤t_sprite, 0);
}
The loads of magic rings blow up, but the boss instantly plays the die seq, and doesn't say anything.
I think what's wrong is, when an enemy reaches 0 HP, as well as the die() procedure running, the enemy plays the die seq and deactivates, or something. So, since it deactivates, it can't say anything, therefore, well, it doesn't say anything. Any help?