Reply to Re: more trouble with these dang scripts
If you don't have an account, just leave the password field blank.
void main ( void )
{
preload_seq(251);
preload_seq(253);
preload_seq(257);
preload_seq(259);
int &wife = create_sprite(435, 200, 16, 251, 4);
sp_script(&wife, "wife");
sp_base_walk(&wife, 250);
sp_timing(&wife, 33);
sp_speed(&wife, 1);
sp_touch_damage(¤t_sprite, -1);
}
void touch ( void )
{
sp_touch_damage(¤t_sprite, 0);
freeze(1);
freeze(&wife);
say_stop_npc("`1 Dink", &wife);
wait(200);
sp_dir(1,8);
wait(400);
say_stop_npc("Yes Alyssa?", 1);
wait(400);
say_stop_npc("`1 Will you go to the store and buy some milk?", &wife);
wait(400);
say_stop_npc("`1 We just ran out", &wife);
wait(400);
say_stop_npc("Anything for you my lovely wife", 1);
wait(200);
sp_dir(1, 2);
}
Like this, there's no way this script should crash Dink. Perhaps the wife script?
by the way, you don't unfreeze either of them at the end of the script.
EDIT: if you want to give the touch damage back at the end, you propably want to move Dink away from the blocker too or the script will loop forever.
{
preload_seq(251);
preload_seq(253);
preload_seq(257);
preload_seq(259);
int &wife = create_sprite(435, 200, 16, 251, 4);
sp_script(&wife, "wife");
sp_base_walk(&wife, 250);
sp_timing(&wife, 33);
sp_speed(&wife, 1);
sp_touch_damage(¤t_sprite, -1);
}
void touch ( void )
{
sp_touch_damage(¤t_sprite, 0);
freeze(1);
freeze(&wife);
say_stop_npc("`1 Dink", &wife);
wait(200);
sp_dir(1,8);
wait(400);
say_stop_npc("Yes Alyssa?", 1);
wait(400);
say_stop_npc("`1 Will you go to the store and buy some milk?", &wife);
wait(400);
say_stop_npc("`1 We just ran out", &wife);
wait(400);
say_stop_npc("Anything for you my lovely wife", 1);
wait(200);
sp_dir(1, 2);
}
Like this, there's no way this script should crash Dink. Perhaps the wife script?
by the way, you don't unfreeze either of them at the end of the script.
EDIT: if you want to give the touch damage back at the end, you propably want to move Dink away from the blocker too or the script will loop forever.