Friday, 26 October 2012

MDDN 243, Project 3, Baby animations + Collisions

For our game the bad guy is a baby, yes I know a baby but hey its the only thing we could find out to be bad for batteries. The movement of the battery is an AI. He will always follow the battery as long as it is on screen. His speed changes every few seconds so sometimes he might be following you really slow and the next it would be really fast. What happens for his movement is that if the x is greater than the battery its left animation will be used and if the x is lower than the right animation will turn on.



What we want to happen is that when the baby hits a battery then the babies animation will change to one that has him sucking on the battery. When this happens I want to disable the movements of the battery and hide the actor and when the animation is finished it will all turn back on. The same code applies to that as the movement. If the babies x is greater than the batteries than play left sucking animation.





But something has gone wrong with this. Whenever the baby hits a battery both the baby and the battery will disappear. I have no idea what is going on with this and it is really frustrating me. I am trying to get it to work. But if it doesn't work we have decided to make it that the baby just dies and then will go to a kill screen for the baby. Hopefully we can get it to work before the final hand in.

No comments:

Post a Comment