Reply to Re: Wait times
If you don't have an account, just leave the password field blank.
I figured out a way to make a one frame wait!
All you have to do is to use move_stop with a sprite with a low enough timing and end position that is on opposing direction than the movement.
Here's a modified version of the animation loop from the previous message:
Since the sprite does not need to move to reach the target, the move_stop returns immediately on the next time the sprite's brain activates, which (due to low sp_timing) is going to be the next frame. The sprite's speed and base walk do not matter and its position will not be changed.
If you don't want to mess with ¤t_sprite's timing you can create another sprite and use it for sp_timing and move_stop functions.
All you have to do is to use move_stop with a sprite with a low enough timing and end position that is on opposing direction than the movement.
Here's a modified version of the animation loop from the previous message:
int &seq;
//Timing must be between 1 and 15, so the sprite movement is checked every frame.
sp_timing(¤t_sprite, 1);
loop:
&seq = sp_seq(¤t_sprite, -1);
if(&seq != 0)
{
move_stop(¤t_sprite, 2, -2147483648, 1);
goto loop;
}
//Sprite done animating
Since the sprite does not need to move to reach the target, the move_stop returns immediately on the next time the sprite's brain activates, which (due to low sp_timing) is going to be the next frame. The sprite's speed and base walk do not matter and its position will not be changed.
If you don't want to mess with ¤t_sprite's timing you can create another sprite and use it for sp_timing and move_stop functions.






