søndag 8. november 2009

Case 07

In this case we are supposed to one or more character to follow and try to kill your character. They will not be controlled by your keyboard, but they will be able to have an artificial intelligence so they will be able to tell where you character is at any given time.

We had to create a new .as-file, so we had to make it so the .as-files worked together. After some trial and error with it, they finally communicated with each other.

Not much trouble with this case, the creation of my enemies went smoothly and the programming went fairly well. We got a piece of code again, and I integrated it into my own code. Instead of having the enemy follow the mouse-cursor, I had it to follow my character. It worked pretty well. I also added animation to the enemy and later came the gravity.

I also made it so when the hero and enemy collide, a screen comes up where it says you lost.


In the next case we'll make some object for the hero to pick up to gain points.