[SOLVED] Animation Not Changing Properly

I have used G Develop for almost a year, and I have never I countered this problem.

I have been working on a platform shooter based on smash for a little over a month. The way the game handles how to shoot and what weapon you have is based on the animation of the gun.

For each animation I have a different gun (animation 1 is a pistol, 2 is a shotgun, 3 is a sniper, ect.).

Each time you collect a weapon crate it randomize your weapon.

This is where my problem comes in. The gun fires as if the animation changed but the picture stays the same and never changes, remember that the gun fire is dependent on the animation so I know the animation is changing but it’s not doing so visually.

I did not have this problem until G Develop updated yesterday.

How do I fix this?

I’ve seen other people on this forum who change the animation but forget to add the “Trigger Once” condition so it resets the animation every frame… maybe you have the same issue?

Trigger Once is everywhere it needs to be. It’s not really that the animation isn’t changing, the gun fire depends on the animation and every time that the animation is supposed to change is acts like it does and I even have text that states the number of the animation which does change as well, but nothing visually happens.

After a little more testing I now know for a fact that the animation Is changing, but the picture it’s showing is for animation 0 no matter what animation is supposed to be displayed.

this happens if two animations play at the same time or the animation isn’t set to loop mode or the animation is paused

I checked that too, hoping that I was calling for the animation to change twice at the same time and found nothing doing so.

I did find a way around this problem, but I didn’t solve the problem. I created an extra object that sits directly on top of the original one with the same animations and I use an event to keep thses two items set to the same animation. The new one changes but the old one doesn’t even though they are set to be the exact same thing. I also hid the original object so that no one can see the problem.

It’s not solved, but it is no longer a problem either.

The only thing that makes sense at this point is when G Develop updated or I saved the project something corrupted. This has happened before in this project and set back production an entire week.

Sounds like you had an animation conflict.
If you added an identical object on top of the first one, why keep the first one?

I only have to leave in the original object because all of the events dealing with gunfire rely on that one object.

If I were to delete it that would cause me to have to redo an entire month’s worth of coding.

Backup your project to another folder.
Delete the original object (click Cancel when asked if related actions should be removed), and rename the second object like the original object. And voilĂ !
If the problem returns, you have a problem in your events. If the problem doesn’t return, there probably was some data corrupted at some point.

I actually didn’t know you could delete an object without removing all of its events! That’s actually really helpful for many reasons.

I do wish that I knew why this was happening to only this object, but thank you for your assistance. I will mark this as solved.

1 Like