Eli Deeth Blog 3


Week 4

This week my task i had was to finish my wolfenstein game. For some reason i thought this game was due last week although with the extra week i was able to add a lot to my game.

Making this game was really fun and the only thing in the end that i didn’t add was weapons. But because of this i didn’t complete the health system (although it is in the game) or ammo system (although the HUD has been made and only needed to be wired up). Instead i focused on completing score, the melee weapon and an exit with a game over screen. Which did make my game look a lot more presentable then the state it was in last week.

The first thing i worked on was the scoring system. For this i used the same code we used for the health system so that the values could be seen in the coin script

public Text value2;

void HandleonScorechange (float Score)
value2.text = Score.ToString ();

with in the coin script i used transform.rotate to allow the coin to spin. when the coin didn’t spin it didn’t look as presentable as i didn’t put much detail into the art that i created.

void Update () {

transform.Rotate(Vector3.right, turnspeed * Time.fixedDeltaTime);


The next thing i worked on was adding the melee weapon to the game which ended up looking like a punch animation when i was aiming for a knife attack. To do this i used two scripts one which was attached to a trigger and used the ontriggerenter code. While the second script would just enable the trigger allowing it to destroy objects. The second script also included knife.transform.Rotate (Vector3.up, turnspeed * Time.fixedDeltaTime); which would rotate the knife for .3 seconds and then rotate the knife back to it starting position.

The Exit was very simple to complete i started by designing a simple door and adding a trigger to its middle then i used the code below,

void OnTriggerEnter(Collider other)
{Gameover.enabled = true;}

To tell my game over script that the player has walked into it. Then all i needed to include was the score which was added using.

public Text value;

value.text = Score.ToString ();

My plan for next week is to start on the main assignment and try and get as much of it done as possible. I am really looking forward to working on it as i love katamari.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s