Friday, October 23, 2020

Unity tutorial 4

 This week in unity was the first tutorial that showed how to write a custom function in a script. This was that there are many different animals coming at once but randomly. Next was adding an invokerepeating variable which when at a certain time a specific object will come in this case the animals instead of having to press S. The next was adding a trigger so allow the animal to disappear when the food hits it. Next was to add an element to allow the player to know that the game is over. Debug.Log(game over) is what typed into the script. 

Seeing that we have to try to figure it out, I won't lie I get a bit overwhelmed but I suppose it will help me do my own game as there will be no one to help me or tell me how. Like the airplane one I had to do this a few times as I kept getting it wrong. The only good thing about this one was that there was no camera movement that had to be fixed like the other one as I found that difficult. I had to use the hints to help me along the way especially with the last one as the scripts are what is the most confusing for me  

screenshot from script 



screenshot from game 






No comments:

Post a Comment