The Dink Network

Reply to Script Troubles

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 12th 2008, 04:49 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
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(&current_sprite);
say("`2NO! NO!! NOOOooo...", &current_sprite);

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_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*", &current_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-", &current_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...", &current_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...",, &current_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(&current_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?