pushing things
theres some thing im not quite getting with oblects that can be pushed. i just cant do it goddamit! anyways, i've even tryed copying scripts from dink. if somebody would explain the baisics of pushing things (and perhaps making things go away when you place a bomb beside them) it would be humungously.
EDIT: holy crap, it is an *art* to be able to spell that bad!
EDIT: holy crap, it is an *art* to be able to spell that bad!
If Dink is showing his push animation, things work just fine, but then it's the script. Here's an example push script:
void main( void )
{
int &mydir;
}
void push( void )
{
&mydir = sp_dir(1, -1);
if (&mydir != 6)
{
say("I can't push from this direction",1);
}
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
move_stop(¤t_sprite, 6, 400, 1);
sp_hard(¤t_sprite, 0);
draw_hard_sprite(¤t_sprite);
}
Make sure, though, that you've set push_active(1); somewhere, and that it's still 1
void main( void )
{
int &mydir;
}
void push( void )
{
&mydir = sp_dir(1, -1);
if (&mydir != 6)
{
say("I can't push from this direction",1);
}
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
move_stop(¤t_sprite, 6, 400, 1);
sp_hard(¤t_sprite, 0);
draw_hard_sprite(¤t_sprite);
}
Make sure, though, that you've set push_active(1); somewhere, and that it's still 1
I quote the updated DinkC reference:
"draw_hard_sprite() adds the hardness for
the sprite's new location, but does not remove the hardness from its old one."
I've never encountered this problem since I always use draw_hard_map, so I wouldn't know if Ted is right or not. But if you still have trouble, that's something to try (draw_hard_map instead of draw_hard_sprite).
"draw_hard_sprite() adds the hardness for
the sprite's new location, but does not remove the hardness from its old one."
I've never encountered this problem since I always use draw_hard_map, so I wouldn't know if Ted is right or not. But if you still have trouble, that's something to try (draw_hard_map instead of draw_hard_sprite).
Dude. I've probably read that definition a few dozen times, but I never really noticed the 'but does not remove the hardness from the old one' clause.
That makes draw_hard_sprite *extremely* powerful.
That makes draw_hard_sprite *extremely* powerful.