📧 Message Board Archive

Scripting help wanted
In underneath script, the sprite freezes the first part, but after the fade-part he keeps on walking and his text doesn't appear above his head but almost on top of the screen and the text doesn't move with him. Other from that, the script runs fine.

Is it possible to have a fade-part with a sprite that is put on screen? If so, what is wrong with the next script?



void talk(void)

{

freeze(1);

freeze(&current_sprite);



choice_start()

"Say Hello"

(&story == 36) "These are for you"

"Leave"

choice_end()



if (&result == 1)

{

//they say stuff

}



if (&result == 2)

{

if (&story == 36);

{

//they say stuff



script_attach(1000);

fade_down();

wait(3000);

say_xy("'%After 3 hours...", 200, 244);

wait(3000);

fill_screen(0);

load_screen();

draw_screen();

fade_up();

draw_status();

wait(200);



freeze(1);

freeze(&current_sprite);

//At first, I left this part out, but the result

//is the same: the sprite doens't freeze and his

//text appears at the top of the screen.



//they say stuff

&story = 37;

}

}



unfreeze(1);

unfreeze(&current_sprite);



return;



Thanks!
Re: Scripting help wanted
: In underneath script, the sprite freezes the first part, but after the fade-part he keeps on walking and his text doesn't appear above his head but almost on top of the screen and the text doesn't move with him. Other from that, the script runs fine.

: Is it possible to have a fade-part with a sprite that is put on screen? If so, what is wrong with the next script?

: void talk(void)

: {

: freeze(1);

: freeze(&current_sprite);

: choice_start()

:  "Say Hello"

: (&story == 36) "These are for you"

:  "Leave"

: choice_end()

: if (&result == 1)

: {

:  //they say stuff

: }

: if (&result == 2)

: {

: if (&story == 36);

: {

: //they say stuff

: script_attach(1000);

: fade_down();

: wait(3000);

: say_xy("'%After 3 hours...", 200, 244);

: wait(3000);

: fill_screen(0);

: load_screen();

: draw_screen();

: fade_up();

: draw_status();

: wait(200);

: freeze(1);

: freeze(&current_sprite);

: //At first, I left this part out, but the result

: //is the same: the sprite doens't freeze and his

: //text appears at the top of the screen.

: //they say stuff

: &story = 37;

: }

: }

: unfreeze(1);

: unfreeze(&current_sprite);

: return;

: Thanks!



Fast script repair, right here:



IDIOT, YOU ASSIGNED THE SCRIPT TO 1000 BEFORE THE FADE_DOWN();



sorry, caps-lock was on

Re: Scripting help wanted
: : In underneath script, the sprite freezes the first part, but after the fade-part he keeps on walking and his text doesn't appear above his head but almost on top of the screen and the text doesn't move with him. Other from that, the script runs fine.

: : Is it possible to have a fade-part with a sprite that is put on screen? If so, what is wrong with the next script?

: : void talk(void)

: : {

: : freeze(1);

: : freeze(&current_sprite);

: : choice_start()

: : "Say Hello"

: : (&story == 36) "These are for you"

: : "Leave"

: : choice_end()

: : if (&result == 1)

: : {

: : //they say stuff

: : }

: : if (&result == 2)

: : {

: : if (&story == 36);

: : {

: : //they say stuff

: : script_attach(1000);

: : fade_down();

: : wait(3000);

: : say_xy("'%After 3 hours...", 200, 244);

: : wait(3000);

: : fill_screen(0);

: : load_screen();

: : draw_screen();

: : fade_up();

: : draw_status();

: : wait(200);

: : freeze(1);

: : freeze(&current_sprite);

: : //At first, I left this part out, but the result

: : //is the same: the sprite doens't freeze and his

: : //text appears at the top of the screen.

: : //they say stuff

: : &story = 37;

: : }

: : }

: : unfreeze(1);

: : unfreeze(&current_sprite);

: : return;

: : Thanks!

: Fast script repair, right here:

: IDIOT, YOU ASSIGNED THE SCRIPT TO 1000 BEFORE THE FADE_DOWN();

: sorry, caps-lock was on



So I should leave script_attach out of this script? Or should it be in, but somewhere else?

Re: Scripting help wanted
: : : In underneath script, the sprite freezes the first part, but after the fade-part he keeps on walking and his text doesn't appear above his head but almost on top of the screen and the text doesn't move with him. Other from that, the script runs fine.

: : : Is it possible to have a fade-part with a sprite that is put on screen? If so, what is wrong with the next script?

: : : void talk(void)

: : : {

: : : freeze(1);

: : : freeze(&current_sprite);

: : : choice_start()

: : : "Say Hello"

: : : (&story == 36) "These are for you"

: : : "Leave"

: : : choice_end()

: : : if (&result == 1)

: : : {

: : : //they say stuff

: : : }

: : : if (&result == 2)

: : : {

: : : if (&story == 36);

: : : {

: : : //they say stuff

: : : script_attach(1000);

: : : fade_down();

: : : wait(3000);

: : : say_xy("'%After 3 hours...", 200, 244);

: : : wait(3000);

: : : fill_screen(0);

: : : load_screen();

: : : draw_screen();

: : : fade_up();

: : : draw_status();

: : : wait(200);

: : : freeze(1);

: : : freeze(&current_sprite);

: : : //At first, I left this part out, but the result

: : : //is the same: the sprite doens't freeze and his

: : : //text appears at the top of the screen.

: : : //they say stuff

: : : &story = 37;

: : : }

: : : }

: : : unfreeze(1);

: : : unfreeze(&current_sprite);

: : : return;

: : : Thanks!

: : Fast script repair, right here:

: : IDIOT, YOU ASSIGNED THE SCRIPT TO 1000 BEFORE THE FADE_DOWN();

: : sorry, caps-lock was on

: So I should leave script_attach out of this script? Or should it be in, but somewhere else?



Only use script_attach(1000); when warping to another screen. Dont use Load_screen(); Draw_screen(); if you only want to make black and undo black.  If you only want to make the screen black, say something and then undo the blackness use:

fade_down();

//do something

wait(1000);

fade_up();

//the script is still assigned to the person

//so you can still use &current_sprite



//lets say things using &current_sprite

Re: Scripting help wanted
: : : : In underneath script, the sprite freezes the first part, but after the fade-part he keeps on walking and his text doesn't appear above his head but almost on top of the screen and the text doesn't move with him. Other from that, the script runs fine.

: : : : Is it possible to have a fade-part with a sprite that is put on screen? If so, what is wrong with the next script?

: : : : void talk(void)

: : : : {

: : : : freeze(1);

: : : : freeze(&current_sprite);

: : : : choice_start()

: : : : "Say Hello"

: : : : (&story == 36) "These are for you"

: : : : "Leave"

: : : : choice_end()

: : : : if (&result == 1)

: : : : {

: : : : //they say stuff

: : : : }

: : : : if (&result == 2)

: : : : {

: : : : if (&story == 36);

: : : : {

: : : : //they say stuff

: : : : script_attach(1000);

: : : : fade_down();

: : : : wait(3000);

: : : : say_xy("'%After 3 hours...", 200, 244);

: : : : wait(3000);

: : : : fill_screen(0);

: : : : load_screen();

: : : : draw_screen();

: : : : fade_up();

: : : : draw_status();

: : : : wait(200);

: : : : freeze(1);

: : : : freeze(&current_sprite);

: : : : //At first, I left this part out, but the result

: : : : //is the same: the sprite doens't freeze and his

: : : : //text appears at the top of the screen.

: : : : //they say stuff

: : : : &story = 37;

: : : : }

: : : : }

: : : : unfreeze(1);

: : : : unfreeze(&current_sprite);

: : : : return;

: : : : Thanks!

: : : Fast script repair, right here:

: : : IDIOT, YOU ASSIGNED THE SCRIPT TO 1000 BEFORE THE FADE_DOWN();

: : : sorry, caps-lock was on

: : So I should leave script_attach out of this script? Or should it be in, but somewhere else?

: Only use script_attach(1000); when warping to another screen. Dont use Load_screen(); Draw_screen(); if you only want to make black and undo black. If you only want to make the screen black, say something and then undo the blackness use:

: fade_down();

: //do something

: wait(1000);

: fade_up();

: //the script is still assigned to the person

: //so you can still use &current_sprite

: //lets say things using &current_sprite



Thank you very much! :)