Thursday, 7 April 2016

Cuppa Team Health/Score Coding.


Cuppa Team Health/Score Coding.

For my part of the coding, I was given the job of creating the health system. I also took it upon myself to join Yasmin whenever possible, to assist her with various other pieces of code. The main one being the score system. I also took this opportunity to learn from her/what she knows about coding. I started by looking at online tutorials but found most of these were in Java script, which wasn't useful as we're using C#. I managed to find a useful tutorial that actually used C# within it. I then wrote a health script for the game, however whenever it was implemented, it would break a different script, making the whole game break. Each time I tried to change the code, something new would break. We re-checked the code but to no avail as we can't seem to debunk what the problem is. This problem has kept occuring, all the way up to deadline no matter how many times we try to fix it, so we have decided to take it out of the game. See below some screenshots of one of the health script attempts.







Testing the game with the score code working!


This is where the health percentage would have been situated within the game if the code would have worked. When entering the game, the text would have changed to Health:100%, and each hit you take would take 10% off the overall health.



We created tags for each object within the game so that we can reference That object within the code.


No comments:

Post a Comment