The Dink Network

moving the bed..........

August 4th 2006, 03:03 PM
milder.gif
When I push this bed from the east, west and north it also goes north. I don't want that.
But when I push it north it also goes north. That is what I want. I don't want it to move when it will be pushed east, west or north.

I am using this script:

void main( void )
{
sp_speed(&current_sprite, 1);
int &mydir;

if(&story > 25)
{
sp_y(&current_sprite, 89);
draw_hard_map();
}

}

void push( void )
{

if (&story < 25)
{
say_stop("I am not ready yet.", 1);
return;
}

&mydir = sp_dir(1, -1);

if (&rock_placement == 0)
{
//bed is over hole

if (&story >= 25)
{
say("Let's push this thing.", 1);
freeze(1);
move_stop(&current_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}

say("It won't budge from this angle.", 1);

}

please help
August 4th 2006, 03:13 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Roit... you can get rid of your second &story checking if statement (as it is redundant), and replace it with one that checks which direction Dink is pushing... like so:

if (&rock_placement == 0)
{
//bed is over hole

if (&mydir == 8)
{
say("Let's push this thing.", 1);
freeze(1);
move_stop(&current_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}

say("It won't budge from this angle.", 1);

}
August 4th 2006, 05:00 PM
milder.gif
ok, this one works but the bed doesn't stay on the place where it has been pushed to. So what is wrong.

The script:

void main( void )
{
sp_speed(&current_sprite, 1);
int &mydir;

if(&rock_placement = 1)
{
sp_y(&current_sprite, 89);
draw_hard_map();
}

}

void push( void )
{

if (&story < 25)
{
say_stop("I am not ready yet.", 1);
return;
}

&mydir = sp_dir(1, -1);

if (&rock_placement == 0)
{
//bed is over hole

if (&mydir == 8)
{
say("Let's push this thing.", 1);
freeze(1);
move_stop(&current_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}

say("It won't budge from this angle.", 1);

}

please help???????????
August 4th 2006, 05:11 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
I count 6 open braces and 5 closing braces...

brace = { and }
August 4th 2006, 05:29 PM
milder.gif
I can't find the wrong {}. Please help?????
August 5th 2006, 07:04 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
void push isn't closed. Just go through the script and open and close as you go along.
August 5th 2006, 10:04 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
&mydir = sp_dir(1, -1);

if (&rock_placement == 0)
{
//bed is over hole



No closing bracket after this if?
August 5th 2006, 10:12 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
say("It won't budge from this angle.", 1);

}


That one. It's either the rock_placement closing bracke, or the push closing bracket.