The Dink Network

Just one more....

June 6th 2003, 05:53 PM
pillbug.gif
I promise my d-mod will be better than dirt if, you help me with this scripting problem,

void talk(void)
{
if(&stick < 4)
{
freeze(1);
freeze(&current_sprite);
say_stop("`#Go away now",&current_sprite);
unfreeze(1);
unfreeze(&current_sprite);
return;
}
if(&stick==4)
{
freeze(1);
move_stop(1, 8, 101, 1);
say("Ok.. just need to rub these together..",1);
wait(4000);
move_stop(&current_sprite, 8, 97, 10);
\\point of no continuation, help
say("Move aside, let me show you how it's done",&current_sprite);
wait(4000);
say_stop("Erm.. ok...",1);
wait(4000);
move_stop(1, 6, 116, 1);
sp_dir(1, 4);
wait(2000);

fade_down();
fill_screen(0);
say("ONE MINUTE LATER",1);
wait5000);
&player_map = 431;
sp_x(1, 473);
sp_y(1, 300);
script_attach(1000);
load_screen();
draw_screen();
draw_status();
fade_up();

say("NOOO!! MOM!!",1);
wait(4000):
say_stop("THE WIZARD!! HE's GOTTA HELP!!",1);
wait(4000);
move_stop(1, 8, 0, 1);

fade_down();
fill_screen(0);
wait(2000);
&player_map = 195;
sp_x(1, 404);
sp_y(1, 391);
script_attach(1000);
load_screen();
draw_screen();
draw_status();
fade_up();

int&guard = create_sprite(451, 104, 301, 1);
sp_base_walk(&guard, 300);
sp_speed(&guard, 1);

freeze(&guard);

move_stop(1, 8, 145, 1);
wait(2000);
move_stop(1, 6, 146, 1);
say("LET ME PASS!",1);
wait(4000);
say("I'm sorry, I can't let you do that.",&guard);
wait(4000);
say("YES YOU CAN!!",1);
wait(4000);
unfreeze(1);
sp_base_death(&guard, 305);
sp_brain(&guard, 9);
sp_distance() ;
June 6th 2003, 05:54 PM
pillbug.gif
NOTE: The circle with dots around it means current
June 6th 2003, 06:04 PM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
OMFG, why is this occuring now?! I think redink broke it.

EDIT: I fixed it.
June 6th 2003, 06:07 PM
spike.gif
move_stop(&current_sprite, 8, 97, 10);

So this is where the script stops working at? Well... Nothing else wrong here except that you have 10 instead of 1 in the end of the statement. Or if that's not the problem the sprite you want to move could be placed further north than 97Y, which makes it impossible to move it further north.

Also later in the script, you have wait5000);, you obviously forgot to add a ( there. Also you should add the map number to the load_screen(); command. (load_screen(431); )

And yet later in the script... You have
int&guard = create_sprite(451, 104, 301, 1);
when you should have
int &guard = create_sprite(451, 104, 0, 301, 1);

+You don't have to freeze the guard before you give him a brain...
June 6th 2003, 06:27 PM
pillbug.gif
Well, those are problems, thanks for that, but, it seems that the sprite moves, then the game freezes (Even without those problems)
June 7th 2003, 01:01 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
Also you should add the map number to the load_screen(); command. (load_screen(431);

I wish people would stop spreading that stupid rumor. It's WRONG I tell ya. You can put whatever you desire between those two parentheses, Dink chooses to IGNORE it.