📧 Message Board Archive

Script likes to kill its self
my intro script likes to kill its self right after displaying a .bmp to screen it used to work fine untill i screwed it up some how. Lets play a nice game of spot the errors.



void main( void )

{

 // make a night shade

 int &dark = create_sprite(610, 392, 0, 856, 1);

 

 say_xy("'2blah.", 20, 130);

 wait(3700);

 say_xy("blah blah.", 20, 130);

 wait(3700);

 say_xy("'la la blah.", 20, 130);

 wait(3100);

 say_xy("'blah", 20, 130);

 wait(3500);

 say_xy("'blahely", 20, 130);

 wait(3500);

 

 fade_down();

 fill_screen(0);

 

playmidi("51.mid");

show_bmp("tiles\tavern.bmp", , );

<< im thinking right about here it dies because after the .bmp is displayed the screen is, drawn but none of the sprites are int, and created, not even dink he stays as a pointer which can be moved with the arrows.>>



 &player_map = 5;

 draw_background();

 load_screen();

 draw_screen();

 

 freeze(1);

 sp_x(1, 514);

 sp_y(1, 205);

     

 sp_base_walk(1, 70);

 sp_base_attack(1, 100);

 sp_dir(1, 8);

 sp_brain(1, 1);

 sp_que(1, 0);

 sp_noclip(1, 0);

 sp_speed(1, 1);

 sp_timing(1, 0);

 

 // make pills at bar

 int &barpill1 = create_sprite(267, 115, 6, 130, 133);

 sp_brain(&barpill1, 6);

 sp_base_walk(&barpill1, 130);

 sp_speed(&barpill1, 1);

 sp_timing(&barpill1, 0);

 sp_pseq(&barpill1, 133);

 sp_pframe(&barpill1, 6);

 wait(1);

 sp_dir(&barpill1, 6);

Re: Script likes to kill its self
Two possible causes:



1. put script_attach(1000); before fade_down();

 Even if you spawn this script in the first place. I encounter a few "disappearence" of the scripts with spawn.



2. The other problem is kind of bizzard. The bmp file you want to show needs to be 640x480. Anything smaller than that would cause weird problem. I don't know why.



: my intro script likes to kill its self right after displaying a .bmp to screen it used to work fine untill i screwed it up some how. Lets play a nice game of spot the errors.



: void main( void )



: {



:  // make a night shade



:  int &dark = create_sprite(610, 392, 0, 856, 1);



:  



:  say_xy("'2blah.", 20, 130);



:  wait(3700);



:  say_xy("blah blah.", 20, 130);



:  wait(3700);



:  say_xy("'la la blah.", 20, 130);



:  wait(3100);



:  say_xy("'blah", 20, 130);



:  wait(3500);



:  say_xy("'blahely", 20, 130);



:  wait(3500);



:  



:  fade_down();



:  fill_screen(0);



:  



: playmidi("51.mid");



: show_bmp("tiles\tavern.bmp", , );



: << im thinking right about here it dies because after the .bmp is displayed the screen is, drawn but none of the sprites are int, and created, not even dink he stays as a pointer which can be moved with the arrows.>>



:  &player_map = 5;



:  draw_background();



:  load_screen();



:  draw_screen();



:  



:  freeze(1);



:  sp_x(1, 514);



:  sp_y(1, 205);



:  



:  sp_base_walk(1, 70);



:  sp_base_attack(1, 100);



:  sp_dir(1, 8);



:  sp_brain(1, 1);



:  sp_que(1, 0);



:  sp_noclip(1, 0);



:  sp_speed(1, 1);



:  sp_timing(1, 0);



:  



:  // make pills at bar



:  int &barpill1 = create_sprite(267, 115, 6, 130, 133);



:  sp_brain(&barpill1, 6);



:  sp_base_walk(&barpill1, 130);



:  sp_speed(&barpill1, 1);



:  sp_timing(&barpill1, 0);



:  sp_pseq(&barpill1, 133);



:  sp_pframe(&barpill1, 6);



:  wait(1);



:  sp_dir(&barpill1, 6);



Aww thanks mimi
i forgot i took that attach script line out cause i didnt think it did anything
Re: Script likes to kill its self
Try: show_bmp("tiles\tavern.bmp", 0, 0);
Ack didnt work yo, (NT)