The Dink Network

Reply to Re: Frame/Sequence Help

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:
 
 
October 16th 2006, 03:04 AM
duckdie.gif
Thanks for all the great help and advice everyone! I got a couple more questions with scripting that I got stuck at if you don't mind...:

playmidi("MIDI.mid");
int &milder = create_sprite(180, 174, 6, 403, 8);
sp_base_walk(&milder, 400);
sp_speed(&milder, 1);

move_stop(&milder, 6, 230, 1);
say_stop("TEXT", &Milder);
wait(2000);
say_stop("TEXT", &Milder);
sp_brain(&milder, 0); //10th line
wait(700);

sp_pseq(&milder, 403);
sp_pframe(&milder, 3); sp_x(&milder, 230); sp_y(&milder, 181);
wait(1000);

First of all, on the tenth line where I change the brain, does the Dink Engine take a while to realize I changed it or does the current sequence have to be completed before the sprite "freezes"? I have been having trouble between switching the brain off (to zero) and then "jumping" the sprite to a new seq, frame, x and y coordinate because the sprite still moves for less than a second after I turn it's brain off. So essentially, I want the sprite to walk in place, then freeze up and stay frozen while being moved around.

I attempted to correct this problem by adding in the "wait(700);", but there has got to be a more effective way because sometimes the "wait(700);" is too long so the sprite has already stopped moving before it "jumps" and other times it's just the opposite.

Also, everytime I use "sp_pseq(&XXX, XXX);" and "sp_pframe(&XXX, XXX);" do I need to state "sp_x(&XXX, XXX);" and "sp_y(&XXX, XXX);" in order to get the sprite to display?

And finally... what is "preload_seq(XXX);" and how does it work? I noticed it was in the dink source at the top of many scripts. Would I be able to use it here?

Thanks so much again for all your help!!