Reply to Re: need some help
If you don't have an account, just leave the password field blank.
July 28th 2010, 04:13 PM

developer


i see. it's not working how I had in mind though. i would like the rock to move 5 pixels to the right everytime the player pushes it. i have made this now:
the rock begins at x=350, so when the player pushes the rock, it moves 5 pixels (to 355) but when pushed again, the rock doesnt move again. also the hardness of the rock stays in the old position instead of the new position...
void main(void) { int &direction; &location = sp_x(¤t_sprite, -1) sp_speed(¤t_sprite, 1); sp_hard(¤t_sprite, 0); draw_hard_map(); } void push(void) { &direction = sp_dir(1, -1); if (&direction == 6) { if (&location == 350) { move(¤t_sprite, 6, 355, 1); draw_hard_map(); &location = sp_x(¤t_sprite, -1) &location += 5; } } if (&location > 350) { move(¤t_sprite, 6, &location, 1); draw_hard_map(); &location = sp_x(¤t_sprite, -1) &location += 5; } }
the rock begins at x=350, so when the player pushes the rock, it moves 5 pixels (to 355) but when pushed again, the rock doesnt move again. also the hardness of the rock stays in the old position instead of the new position...