Same here. I have run into bugs often due to my bad programming but usually my systems run perfectly fine the way I set them up in GM.
I really do wonder what is happening though.
I'm currently starting on a platformer type of game and am getting in the headspace of thinking what I need in place so if I have similar bugs I'll report so.
I'm planning on doing attack animations as spawned objects rather than part of the controlled character.
EDIT:
Oh man didn't see this... That red error is the one thing you have to watch out for!!! I don't know what it is exactly but it fucks up GM super bad with whatever you are working on!
It's the biggest gripe that I have with using studio but it's super rare and easy to avoid with duplicates of versions of your game...
The key is: do not save if you get this error!!!
This is what is causing your pain. If this happens just close GM, don't save, and reopen. You might need to redo work busy constant saving will be your friend if it isn't already.
My only guess is that it fucks up how GM reads the code/compile. The one way this usually happens is when you run or debug run the game and stop it in the middle of the compile, this error happens in all later builds
I hope that helps. I've gone through a lot of pain on one project because of this but now it's easy to avoid.
That error happens on launching GM. Never had it happen during. So if I "saved" after the program launched after the error I'm pretty much screwed?
Edit:
I'll elaborate on a spawn mechanic.
if (spawning) //note, there's nothing else here to trigger spawning but spawning being TRUE which is set in the creation then immediately deactivated when the animation completes
{
//do everything to play the spawn animation, switch to an idle state and give the player control
}
Now - this works fine. to end the spawning animation I just look for image_index and key the final frame. Works great for spawning. This method does not work for any other animation. I have to use an End Animation event to trigger other animations to play once.
So now I have this damage animation i'm testing and tweaking so I set it to trigger on a key and a bumper on my 360 controller
if (keypress && TakeDamage && CanControl) // check the keypress, check to make sure the damage timeout is TRUE and check to make sure the character can be controlled (the only time he can take damage)
{
//play damage animation, bump him back with a hop, start "visible" cycling for a second for old-school flickering goodness
}
That plays the spawning animation even though the sprite_index is a different name. On top of that, even though it requires a keypress - it alters his movement speed since I use hspeed and vspeed to knock the player back but shouldn't since... it's not being activated until a keypress.
I've started from a clean slate even doing nothing other than triggering sprites for animations and I still bug out.
His spawning animation. Speed at 0.25? Plays fine. Speed at 0.3? Loops indefinitely. Speed at 0.4? Plays fine. 0.45? Loops. Even with a stop by image_index and image_speed to 0. still does it. Even with an End Animation event... still does it.
Something is afoot.
>.>
<.<