Saturday 5 July 2014

Bug Beat Down.

Welp...  Work is as boring as I remember it.  No real choice though, I need to feed myself, pay bills, buy computer stuff.....  At least my ear infection is almost gone....  Anyway I'm sure you didn't come here to hear me complain about my day job.


I had a problem with the character controller setup until recently.  The player would be sluggish when changing directions and moonwalk at some points.  I thought that it was a problem with my lame and un-elite scripting techniques.  It was actually a few simple problem with the character controller I made.  I forgot to link a direct transition between both walk cycles.  The issues with the moon walking was caused by the character controller trying to get from two idle states to the next walk state.  Simple, but when your head is filled with rocks everything is painful to learn.

 Another problem I was having was with picking up the loot bag drop.  I couldn't get the character to pick up every bag in the scene, it would only pick up one at a time.  I was working on an ambient prop automation script yesterday to animate some of the static scenery.  While I was testing this I kept getting errors about the loot bag after about a minute into the testing phase.  I then remembered that I added a clean up script that removes things like monster drops in a designated time span. 

It took me a while for the rocks in my head to finally move, but I realized that Unity was complaining because it was trying to find a component that was no longer in the scene.  After referring to the Unity 2D demo project scripts, I finally realized that I should be putting the OnTrigger event in the bag script itself.

It works as intended now.....  And I feel kind of stupid for missing something simple.  On the other hand, I'm happy that I finally figured it out.

So I squashed two annoying bugs yesterday.  Currently rendering a run cycle for the pc.  It's going to take a while because of the number of frames is pretty high (19 per layer).  I want to have a combo system for the attacks, so I have to work on that some point next.  I found several reference scripts on the subject, so I don't think I'll run into any issues.

No comments:

Post a Comment