

Originally posted by BOYCOTT S-T-E-A-M!:^ What they said. You'd then want an alarm event for alarm 0 to have it so that once the alarm reaches 0 you set your image speed to 1 and your image index to frame 1 and to be safe set the alarm to -1 so that it knows its stopped for now. What I believe you want to happen is to check if you're at image frame 0. You then start the animation going again. Immediately after setting it to 60 you're checking if that same alarm is equal to 60, which it is since you just set to that. You're then setting alarm number 0 to the number 60. You're checking if the image is at frame 0. Might not be necessary, but try it if your animation doesn't seem to advance past frame 0.ĮDIT : Actually, looking at it again quickly your alarm itself is likely going to be an issue. Otherwise it may fall into a loop where you just sit at frame 0 all the time. You might also want to set your image_index to the next frame (frame 1) when your alarm ends in addition to setting the image_speed. Image_index is which frame the objects sprite is currently at. Like if you wanted to switch your player from "spr_idle" to "spr_walking" or whatever. Choose from our massive catalog of 2D, 3D models, SDKs, templates, and tools to speed up your game development. If you want your sprite to stop, rather than start to move in the other direction, you'll need to use a conditional to check that the sprite is moving in the correct direction before you use the counter pattern, and stop the sprite if it isn't.Sprite_index is for changing which sprite an object is using. Discover the best assets for game making. This can make it look like your sprite is jumping or has been thrown in the air. Once a sprite has slowed down to a stop, it will start speeding in the other direction.


To slow down a sprite with a negative velocity, you need to add to the velocity inside the counter pattern. To slow down a sprite that has a positive velocity, you need to subtract from the velocity inside the counter pattern. To speed up a sprite with a negative velocity, you need to subtract from the velocity inside the counter pattern. To speed up a sprite that has a positive velocity, you need to add to the velocity inside the counter pattern. This makes the sprite speed up or slow down. You can use a sprite's velocity properties with the counter pattern to change a sprite's velocity during the program.
