The Dink Network

scripting q

February 3rd 2003, 10:21 AM
maidenb.gif
Sharp
Peasant She/Her Finland
 
Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

void main( void )

{

freeze(1);

wait(200);

move_stop(1, 8, 300, 0);

freeze(&sprite2);

fade_up();

say_stop("I'm saying things just for an example!", &sprite2);

unfreeze(1);

unfreeze(&sprite2);

}

And sprite2 doesn't say a thing.. anyone?
February 3rd 2003, 10:53 AM
old.gif
: Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: void main( void )

: {

: freeze(1);

: wait(200);

: move_stop(1, 8, 300, 0);

: freeze(&sprite2);

: fade_up();

: say_stop("I'm saying things just for an example!", &sprite2);

: unfreeze(1);

: unfreeze(&sprite2);

: }

: And sprite2 doesn't say a thing.. anyone?

first of all, if the sprite is NOT spawned, then use &current_sprite, if it IS spawned ( and always do this ) make sure &sprite2 is a GLOBAL int, not a int created in a script...

February 3rd 2003, 11:48 AM
milder.gif
Kory
Peasant He/Him Croatia
 
This is my intro script! I hope it will help you!

It works form me! If i undestod what help ypu need!

--Kory

void main(void)

{

freeze(1);

playmidi("mg8_ami.mid");

wait(500);

say_stop_xy("'2Dink was captured in his own mind", 10, 370);

wait(500);

sp_dir(1, 2);

wait(200);

say_stop("Im all alone! Mommy...daddy!", 1);

wait(500);

say_stop("Where...where are you? I cant be alone like that!", 1);

wait(500);

say_stop_xy("'3Misteryous voice: You are not alone Dink!", 10, 370);

wait(500);

say_stop("Who is that?", 1);

wait(500);

say_stop_xy("'3Misteryous voice: Its me the guardien angle of heaven!", 10, 370);

wait(500);

say_stop("SHOW YOUR SELF!", 1);

wait(500);

int &angel = create_sprite(258, 361, 9, 300, 1);

freeze(&angel);

sp_dir(&angel, 8);

sp_base_walk(&angel, 300);

sp_speed(&angel, 1);

wait(500);

say_stop("'3Hello Dink!", &angel);

wait(500);

say_stop("Wow! You.....a...r..e....an angel knight with invincible gold armor!!!", !);

wait(500)

move_stop(1, 6, 251, 1);

wait(100);

move_stop(1, 2, 327, 1);

wait(100);

say_stop("I beg you! Please help me! Im all alone! I dont have anybody! Tell me where is my mother and father?", 1);

wait(500);

say_stop("'3The devils son Damien has abducted your father and mother!", &angel);

wait(500);

say_stop("Can i save them? But i cant do it alone!", 1);

wait(500);

say_stop("'3You will find many friends who will help you during your journey! Sure you can save your parents!", &angel);

wait(500);

say_stop("Versus the devils son? I am scared! I need help!", 1);

wait(500);

say_stop("'3God said to me that you are brave, strong and smart!", &angel);

wait(500);

say_stop("...", 1);

wait(500);

say_stop("'3The lord will be with you and your friends!", &angel);

wait(500);

say_stop("I think...yes", 1);

wait(100);

say_stop("'3And umm...i will give you the power fist ability!", &angel);

wait(500);

say_stop("'3I will teleport you to a town where you will find many friends who will help you!", &angel);

wait(500);

say_stop("Ok Angel! I will do it!", 1);

wait(500);

script_attach(1000);

fade_down();

&player_map = 766;

sp_> 1, 274);

sp_y(1, 369);

load_screen(766);

draw_screen();

freeze(1);

fade_up();

wait(1000);

sp_nodraw(1, 0);

draw_status();

sp_active(&angel, 0);

&story = 0;

unfreeze(1);

}

February 3rd 2003, 12:06 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
: Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: void main( void )

: {

: freeze(1);

: wait(200);

: move_stop(1, 8, 300, 0);

: freeze(&sprite2);

: fade_up();

: say_stop("I'm saying things just for an example!", &sprite2);

: unfreeze(1);

: unfreeze(&sprite2);

: }

: And sprite2 doesn't say a thing.. anyone?

Make sure you know where &sprite2 comes from. At least you're not telling us that, darling.

But I can make some assumptions. This is attached to some totally out-of-the-meaning object (since you don't just use &current_sprite as the sprite). You are sure this script runs after the script that creates the &sprite2 sprite? (You know, the order of which scripts are run is totally undecideable, and as I see it, &sprite2 may not yet have been made, considering that there is no create_sprite(); in this script, anyway). This is kind of hard to explain.. but you say you make the "friend sprite" by using spawn("friend"). (I assume this friend sprite is put in &sprite2) But how can you be sure that is run before this script is? You can't. You just can't. Anyway, it's stupid of me making assumptions, I need a wider idea of what you're doing to help you further (by seeing all the scripts involved for instance, and how you spawn this and that, and where &sprite2 came from, and so on)
February 3rd 2003, 01:15 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
: Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: void main( void )

: {

: freeze(1);

: wait(200);

: move_stop(1, 8, 300, 0);

: freeze(&sprite2);

: fade_up();

: say_stop("I'm saying things just for an example!", &sprite2);

: unfreeze(1);

: unfreeze(&sprite2);

: }

: And sprite2 doesn't say a thing.. anyone?

You're working an a dmod?

February 3rd 2003, 01:17 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
: : Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: : void main( void )

: : {

: : freeze(1);

: : wait(200);

: : move_stop(1, 8, 300, 0);

: : freeze(&sprite2);

: : fade_up();

: : say_stop("I'm saying things just for an example!", &sprite2);

: : unfreeze(1);

: : unfreeze(&sprite2);

: : }

: : And sprite2 doesn't say a thing.. anyone?

: You're working an a dmod?

As far as I know, she has always been.. it's going slow, look at the distance between the milderr!!s, but heck, she's done more than I ever have, nonetheless.
February 4th 2003, 09:56 AM
maidenb.gif
Sharp
Peasant She/Her Finland
 
: : : Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: : : void main( void )

: : : {

: : : freeze(1);

: : : wait(200);

: : : move_stop(1, 8, 300, 0);

: : : freeze(&sprite2);

: : : fade_up();

: : : say_stop("I'm saying things just for an example!", &sprite2);

: : : unfreeze(1);

: : : unfreeze(&sprite2);

: : : }

: : : And sprite2 doesn't say a thing.. anyone?

: : You're working an a dmod?

: As far as I know, she has always been.. it's going slow, look at the distance between the milderr!!s, but heck, she's done more than I ever have, nonetheless.

Pretty much all the time there's something going on.. IB is just way too time consuming. I bet this will be something like a one-week phase that I'll have time for.. geesh.

February 4th 2003, 10:03 AM
maidenb.gif
Sharp
Peasant She/Her Finland
 
: : Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: : void main( void )

: : {

: : freeze(1);

: : wait(200);

: : move_stop(1, 8, 300, 0);

: : freeze(&sprite2);

: : fade_up();

: : say_stop("I'm saying things just for an example!", &sprite2);

: : unfreeze(1);

: : unfreeze(&sprite2);

: : }

: : And sprite2 doesn't say a thing.. anyone?

: Make sure you know where &sprite2 comes from. At least you're not telling us that, darling.

: But I can make some assumptions. This is attached to some totally out-of-the-meaning object (since you don't just use &current_sprite as the sprite). You are sure this script runs after the script that creates the &sprite2 sprite? (You know, the order of which scripts are run is totally undecideable, and as I see it, &sprite2 may not yet have been made, considering that there is no create_sprite(); in this script, anyway). This is kind of hard to explain.. but you say you make the "friend sprite" by using spawn("friend"). (I assume this friend sprite is put in &sprite2) But how can you be sure that is run before this script is? You can't. You just can't. Anyway, it's stupid of me making assumptions, I need a wider idea of what you're doing to help you further (by seeing all the scripts involved for instance, and how you spawn this and that, and where &sprite2 came from, and so on)

There's a first script. That's where it teleports dink to that screen. Then, there's the spawn command for sprite2, which is a global int.

That script there is for a guy already standing on the screen, actually, and i stuck in the wait piece so that the spawn script would have time to run through first..

but if that doesn't ensure that the sprite will first be spawned, then HOW should i place the scripts?

first teleport, then the talking seq with just some mic sprite created, and then fadein and spawn the stuff? *hehe* sounds like a plan.

no, you tell me?

February 4th 2003, 10:59 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
: : : Dink is placed to a screen (script_attach, player map change etc), then a follower sprite is created (spawn("friend")) and end of that script. On the screen is some other object, whose script the below is:

: : : void main( void )

: : : {

: : : freeze(1);

: : : wait(200);

: : : move_stop(1, 8, 300, 0);

: : : freeze(&sprite2);

: : : fade_up();

: : : say_stop("I'm saying things just for an example!", &sprite2);

: : : unfreeze(1);

: : : unfreeze(&sprite2);

: : : }

: : : And sprite2 doesn't say a thing.. anyone?

: : Make sure you know where &sprite2 comes from. At least you're not telling us that, darling.

: : But I can make some assumptions. This is attached to some totally out-of-the-meaning object (since you don't just use &current_sprite as the sprite). You are sure this script runs after the script that creates the &sprite2 sprite? (You know, the order of which scripts are run is totally undecideable, and as I see it, &sprite2 may not yet have been made, considering that there is no create_sprite(); in this script, anyway). This is kind of hard to explain.. but you say you make the "friend sprite" by using spawn("friend"). (I assume this friend sprite is put in &sprite2) But how can you be sure that is run before this script is? You can't. You just can't. Anyway, it's stupid of me making assumptions, I need a wider idea of what you're doing to help you further (by seeing all the scripts involved for instance, and how you spawn this and that, and where &sprite2 came from, and so on)

: There's a first script. That's where it teleports dink to that screen. Then, there's the spawn command for sprite2, which is a global int.

: That script there is for a guy already standing on the screen, actually, and i stuck in the wait piece so that the spawn script would have time to run through first..

: but if that doesn't ensure that the sprite will first be spawned, then HOW should i place the scripts?

: first teleport, then the talking seq with just some mic sprite created, and then fadein and spawn the stuff? *hehe* sounds like a plan.

: no, you tell me?

eh.. send me this in the mail, and tell me what's wrong there, and I'll have a look at it. This is getting a little bit too complicated.
February 6th 2003, 02:58 AM
maidenb.gif
Sharp
Peasant She/Her Finland
 


: eh.. send me this in the mail, and tell me what's wrong there, and I'll have a look at it. This is getting a little bit too complicated.

Sure, hon.

(Peace!

--Sharp)
February 6th 2003, 08:42 AM
peasantmg.gif
ehasl
Peasant He/Him
 
Hey, why don't you instead create the sprite while faded down? Then you could attach the script to it aswell... In the script for the guy you could have a wait command while the first script fades up.