I wasn’t miffed that my friend broke the game. I was pretty
vexed that I couldn’t fix it. The way the code works is something like this.
Player class sees and input from actual player when X is
pressed. This sets a flag to true.
Player Animation class is connected to Player class so the
attack animation is triggered to play when the flag is true.
When the animation is finished the flag is set to false
because of Untiy’s animation event trigger.
The hiccup is if the actual player jams on the Attack
Button. Then the flag is always true and then the player is stuck at the last
frame of this animation basically unable to move. Because the flag is never
cleared.
I spent the better half of Wednesday (my most useful day
because Son has no appointments on Wednesday) trying to get this fixed. To no
avail. I also tried to fix it on Thursday and was again completely unproductive.
Basically felt like I wasted two days. On Thursday I walked away and just
painted stuff. I think I need to create a test project with just this situation
isolated to sort it out if I am going to fix this.
I have been working on a lot of little broken things. For
example my artwork with collision objects has no rotation value. All of the
collision objects are various different parallelograms. Implementing this broke
my grenade weapon that grabbed the rotation value and rotated itself then
exploded. With no rotation value this functionality was gone. So I had to fix
it. My player gets the angle of an object that they touch from a raycast I used
this to get the angle of the same collision objects but my player doesn’t care
if the angle is -37 or 37. The grenade object needed to care so basically my
thrown grenades only functioned correctly when hitting an object that was 37
and not -37. Not being able to find an elegant solution I opted for a something
maybe a bit hacky. Hacky but it works! I sure this hack will never come back to
haunt me ever again.
I also checked off creating artwork for the way back
portal. It was then that I accidentally created
the infinite death star. It is just looked a bit like the death star not fully operational
as of yet. I did this while not fixing the player attacking problem. I think it
is a fitting representation of traveling through time. So not a total loss but
not my best week either.