The Dink Network

story does'nt change

March 5th 2005, 07:25 AM
pq_skull.gif
dinkme
Peasant He/Him India
 
I have written the following script for the intro of my D-Mod , I have also mentioned that this script will only run if &story is 0 but still this cut scene repeats itself. Help me out

void main(void)
{

if (&story == 0)
{
freeze(1);

int &maynard = create_sprite(230, 295, 16, 401, 1);
sp_base_walk(&maynard, 400);
sp_speed(&maynard, 1);
freeze(&maynard);

int &guard = create_sprite(363, -31, 16,291 , 1);
sp_base_walk(&guard, 290);
sp_speed(&guard, 1);
freeze(&guard);

sp_dir(1,4);
sp_dir(&maynard,6);

say_stop("How peaceful it is?", 1);
say_stop("`3Hope this peace is not disturbed.",&maynard);

playmidi("start.mid");

sp_dir(1,8);

move_stop(&guard, 2, 178, 1);

move_stop(1,8,210,1);

say_stop("`2Dink Smallwood something terrible has happened!",&guard);
say_stop("Why are you looking so worried?",1);
say_stop("`2A strange man came to visit the king and", &guard);
say_stop("`2then we heard a huge bang. We saw a teleporter open and", &guard);
say_stop("`2the strange man stepped in with the king and disappeared", &guard);
say_stop("`2The chief sent me to call you.", &guard);
say_stop("Ok I will go right there, you take Maynard home.",1);
say_stop("Yes Sir!",&guard);
move_stop(&maynard,6,178,1);
move(&guard,8,-41,1);
move(&maynard,8,-41,1);
wait(6000);
sp_active(&maynard, 0);
sp_active(&guard, 0);

&story = 1;

unfreeze(1);
}
}
March 5th 2005, 11:11 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
It looks ok. (at least &story..) try running in debug mode (alt/D) and see what the log says.
March 5th 2005, 06:48 PM
milder.gif
What is debug mode? What does alt D do? What does is do? Where can you use alt D?
March 5th 2005, 07:02 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Simple, press alt-D while in-game. If you don't see a white-ish bar on top of it, and if you don't see squares around 'touchable' objects, press it again. It rapidly switches between on and off.

This is called the debug mode. A file debug.txt will be made in the DMOD-dir containing information sent by the Dink Engine, or provided with the debug(""); command.

You might be able to use this file to analyse your problems.

By the way, you might want to check if you've defined &story as a global. Most likely it will be, but you never know
March 5th 2005, 07:56 PM
spike.gif
Try moving &story = 1; right after the yes sir line.
March 6th 2005, 01:41 AM
pq_skull.gif
dinkme
Peasant He/Him India
 
Thanks, I just gave spaces,&story = 1; and it started working.