Reply to Re: X y movement commands
If you don't have an account, just leave the password field blank.
I'm assuming the difficulty is coming from having the boss go to those coordinates from any point on the screen?
I would suggest creating a sprite at those coordinates and using sp_follow(&boss, &sprite); Something like this:
The boss won't go to those exact coordinates, it will go a bit off of the statue, so experiment with the statue's coordinates to get the boss right where you want him.
EDIT:
If I'm way off here and you're just trying to get him move, use:
<dir> is a number from 1-9, and it's based on the numpad. 2 is down, 4 is left, 6 is right, 8 is up, and the rest are diagonal directions.
<coordinate> is the X or Y coordinate you want him to move to. So if you have him move right (6), you would use an X coordinate.
The last number is whether or not the sprite can move through hardness, 1 being yes and 0 being no.
I would suggest creating a sprite at those coordinates and using sp_follow(&boss, &sprite); Something like this:
//Wherever you have the previous move() commands at int &sprite = create_sprite(315, 100, 0, 80, 24); //Above sprite is the stone statue head thingy set_smooth_follow(1); sp_follow(¤t_sprite, &sprite);
The boss won't go to those exact coordinates, it will go a bit off of the statue, so experiment with the statue's coordinates to get the boss right where you want him.
EDIT:
If I'm way off here and you're just trying to get him move, use:
freeze(¤t_sprite); move_stop(¤t_sprite, <dir>, <coordinate>, 1);
<dir> is a number from 1-9, and it's based on the numpad. 2 is down, 4 is left, 6 is right, 8 is up, and the rest are diagonal directions.
<coordinate> is the X or Y coordinate you want him to move to. So if you have him move right (6), you would use an X coordinate.
The last number is whether or not the sprite can move through hardness, 1 being yes and 0 being no.