For the past week I have continued to watch Unity tutorials on coding. Also, last Monday 10/03/14, Alister our coding teacher popped in, in the afternoon and helped us out with our Enemy AI Code.
With his help Michael and I were able to see how we would be able to get our enemies to see our player, thus making them change from a patrolling state, to a chase state. Then once the player is out of sight, the enemy would return to it's patrolling waypoints.
It took quite a few hours in all (from about 2:00pm - 5:00pm!), and whilst doing it we encountered a few problems, but Alister was able to problem solve them and then explain the problems to us and how he had managed to fix them. It was a really helpful and useful session because Alister was able to spend alot of time with us, and go through all the problems we had, and was extremely helpful in explaining what was actually wrong, what was causing it and then how to fix it. I personally learnt alot during this session, just by watching and taking it all in, at a pace that suited me very well. I have found in the past that I learn better this way, by observing and then having a go myself.
(Will put here the specific bits of code which were added during our session with Alister here).
This past week, I have had trouble getting on to the digital-tutors website, so I haven't been able to watch any tutorials from there this week. I am still having the same problem today, so I hope that is sorted soon as there is a new tutorial which has been uploaded recently on how to make an Adventure Puzzle game, so as soon as digital-tutors is working, I shall crack on and watch those.
Whilst digital-tutors hasn't been working, I have been continuing to explore the Unity website, and go over some of the Unity Stealth videos I watched at the beginning of the year. The particular video that I have been most interested in this week, has been the Screen Fader tutorial. In this tutorial it shows you how to create the screen fader for the game "using a simple GUI Texture and Color Lerp script". This is going to be used when our player dies, the screen will turn to black and say "Game Over". Along with the video explaining how to create the code, on the same page is a box with all of the code there for you (this happens on the other scripting tutorials for the stealth project), which has comments explaining what each specific part of the code is doing. This is extremely useful as you can follow along with this script whilst they are going through it in the video.
This week, I am hoping to look at how to create the player health script, so that when the player comes in to physical contact with the enemy, the player will die. By completing this, it means that I can then incorporate this screen fader script, and that will be the all the player scripts completed.
Here is the screen fader script with the comments explaining what is going on within the script.
No comments:
Post a Comment