Another script problem!
s1-boss.c
----------
void main( void )
{
int &wiz = create_sprite(470, 200, 9, 581, 1);
sp_speed(&wiz, 1);
sp_base_walk(&wiz, 580);
sp_touch_damage(&wiz, 1);
sp_hitpoints(&wiz, 155);
sp_dir(1, 6);
sp_script(&wiz, "s1-boss1");
}
s1-boss1.c
-----------
void main( void )
{
freeze(1);
freeze(&wiz);
say_stop("I'm going to get all the food you have stolen from me back.", 1);
say_stop("`7Bite me", &wiz);
//and then the batle begins
unfreeze(1);
unfreeze(&wiz);
}
if (random(2,1) == 1)
{
sp_target(¤t_sprite, 1);
}
void talk( void )
{
say("`7DIE...", &wiz);
}
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
}
void die( void )
{
spawn("bossdie");
}
The spawn thing works here, but the wizard won't talk!
----------
void main( void )
{
int &wiz = create_sprite(470, 200, 9, 581, 1);
sp_speed(&wiz, 1);
sp_base_walk(&wiz, 580);
sp_touch_damage(&wiz, 1);
sp_hitpoints(&wiz, 155);
sp_dir(1, 6);
sp_script(&wiz, "s1-boss1");
}
s1-boss1.c
-----------
void main( void )
{
freeze(1);
freeze(&wiz);
say_stop("I'm going to get all the food you have stolen from me back.", 1);
say_stop("`7Bite me", &wiz);
//and then the batle begins
unfreeze(1);
unfreeze(&wiz);
}
if (random(2,1) == 1)
{
sp_target(¤t_sprite, 1);
}
void talk( void )
{
say("`7DIE...", &wiz);
}
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
}
void die( void )
{
spawn("bossdie");
}
The spawn thing works here, but the wizard won't talk!