Reply to Re: "Shadows of Death" script help thread
If you don't have an account, just leave the password field blank.
Okay, I am having multiple problems with my boss script and I have no idea what's going on. I have examined a couple other scripts, including ones I wrote earlier for this game as well as for DatB, and I took pieces of the scripts to fix a couple things already, but I can't seem to get the rest of it to work right. I condensed two scripts into this one, and it solved a few issues, but added at least one of these current ones.
Issues:
sp_target(¤t_sprite, 1); doesn't work, boss won't target Dink.
boss's die procedure text appears in top left corner of the screen for some reason.
hit sounds are playing randomly
The whole script (minus spoilers):
Issues:
sp_target(¤t_sprite, 1); doesn't work, boss won't target Dink.
boss's die procedure text appears in top left corner of the screen for some reason.
hit sounds are playing randomly
The whole script (minus spoilers):
void main(void)
{
preload_seq(271);
preload_seq(273);
preload_seq(275);
preload_seq(277);
preload_seq(279);
preload_seq(712);
preload_seq(714);
preload_seq(716);
preload_seq(718);
int &x;
int &y;
int &wait;
sp_brain(¤t_sprite, 10);
sp_base_walk(¤t_sprite, 270);
sp_speed(¤t_sprite, 3);
sp_base_attack(¤t_sprite, 710);
sp_hitpoints(¤t_sprite, 110);
sp_defense(¤t_sprite, 3);
sp_strength(¤t_sprite, 7);
sp_exp(¤t_sprite, 250);
sp_timing(¤t_sprite, 33);
sp_touch_damage(¤t_sprite, 4);
sp_distance(¤t_sprite, 40);
sp_range(¤t_sprite, 35);
if (&story != 16)
{
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
kill_this_task();
}
if (&story == 16)
{
screenlock(1);
playmidi("18.mid");
freeze(1);
freeze(¤t_sprite);
move_stop(1, 2, 180, 1);
wait(200);
sp_dir(1, 4);
if (&plot == 1)
{
//spoiler dialogue
}
if (&plot == 0)
{
//spoiler dialogue
}
unfreeze(1);
unfreeze(¤t_sprite);
}
sp_target(¤t_sprite, 1);
}
void attack(void)
{
playsound(8, 5050, 0, ¤t_sprite, 0);
&wait = random(4000, 0);
sp_attack_wait(¤t_sprite, &wait);
}
void die(void)
{
script_attach(1000);
&x = sp_x(¤t_sprite, -1);
&y = sp_y(¤t_sprite, -1);
int &dead = create_sprite(&x, &y, 0, 275, 1);
sp_nohit(&dead, 1);
screenlock(0);
freeze(1);
say_stop("`7Uhg.....", &dead);
wait(200);
say_stop("Now tell me why Luke is here!", 1);
wait(500);
say_stop("`7Spoiler", &dead);
wait(500);
say_stop("`7Spoiler", &dead);
wait(500);
say_stop("`7<bleh>", &dead);
wait(1000);
say_stop("Great.", 1);
wait(200);
say_stop("Spoiler", 1);
wait(200);
say_stop("Time to leave this cave and wander the desert.", 1);
&story = 17;
unfreeze(1);
}





