moving the bed..........
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(¤t_sprite, 1);
int &mydir;
if(&story > 25)
{
sp_y(¤t_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(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
please help
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(¤t_sprite, 1);
int &mydir;
if(&story > 25)
{
sp_y(¤t_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(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
please help
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(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
if (&rock_placement == 0)
{
//bed is over hole
if (&mydir == 8)
{
say("Let's push this thing.", 1);
freeze(1);
move_stop(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
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(¤t_sprite, 1);
int &mydir;
if(&rock_placement = 1)
{
sp_y(¤t_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(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
please help???????????
The script:
void main( void )
{
sp_speed(¤t_sprite, 1);
int &mydir;
if(&rock_placement = 1)
{
sp_y(¤t_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(¤t_sprite, 8, 89, 1);
unfreeze(1);
draw_hard_map();
&rock_placement = 1;
return;
}
say("It won't budge from this angle.", 1);
}
please help???????????
I count 6 open braces and 5 closing braces...
brace = { and }
brace = { and }
void push isn't closed. Just go through the script and open and close as you go along.
&mydir = sp_dir(1, -1);
if (&rock_placement == 0)
{
//bed is over hole
No closing bracket after this if?
if (&rock_placement == 0)
{
//bed is over hole
No closing bracket after this if?