The Dink Network

Reply to Re: scripting q

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
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?