Monday, 23 April 2018

Week 29-30

Week 29-30:

HND Project

So, for the past month I’ve been working on another game. I wanted to keep that game and this UE4 Project separate, but I my incorporate bits from both games into on another. For now, I shall be creating a Minimap for the UE4 Project this week and next week. To start off with, I went into the “FirstPersonCharacter” and into its “Viewport”, there I created a “SpringArm” and set its Rotation Y Axis to -90. After that, I then created a “SceneCaptureComponent2D” and named it “MinimapCapture”.


In the “Contents Browser”, in the “Materials and Textures” I then created a new “RenderTarget” and named that “MinimapRenderTarget”. I then went back to the “FirstPersonCharacter” blueprint and went to the “MinimapCapture” where I applied the “MinimapRenderTarget” to its “TextureTarget”. This means it’ll capture its data and render it now as a result.


I then right-clicked on “MinimapRenderTarget” in the “ContentsBrowser” and pressed “Create Material”, thus creating a “MinmapRenderTarget_Mat” which I then clicked and opened it up. I then changed its “Surface” to “User Interface” and then hooked up the “TextureSample” to “Final Color”. I then clicked “Apply” and “Save” before going back to the “Content Browser”.


I then went and created a new “Widget Blueprint” from the “User Interface”, that I then opened and dragged a “Image” across to the screen. I then changed its size to “250”x”250”. In the “Brush” section, I then chose the “MinimapRenderTarget_Mat” and clicked “Compiled”. To get it onto the screen in-game, I then had to click on “Open Level Blueprints” and enter its “Graph”.


I then entered the “Level created the following piece of coding. After this, I received the following results. I then decided to tidy this up due to getting lag from the pitch. To do this, I went back into the “FirstPersonCharacter” viewport and on “SpringArm”, I unclicked all of the “CameraSettings”.




I then clicked onto the “MinimapCapture” and scrolled down to “Perception” and changed it from “Perceptive” to “Orthographic”. I then changed its width from “512” to “1000”. Now when I play the game, it no longer has the lagging issue. Other changes I made, I went into the “SceneCapture” and went into the advanced “General Show Flags”, then ticked off the “Skeletal Meshes”.



After this, I then decided to create an icon to represent my character on the Map. To do this, I found a “Pointer” icon on the internet and then uploaded it onto my UE4 Project.  I then turned into a “Sprite” using the “Create Sprite” option. Then in the viewport, I added “PaperSprite” to the “SpringArm”. 






Monday, 16 April 2018

Week 28

Week 28:

HND Project:

This week I decided to expand upon the HUD a bit more. I decided that when the Player dies the HUD would disappear and then reappear when the Player respawns. To do this, I clicked on the “Behaviour” and pressed “Binding” on the “Visibility”, which then brought me to a new “Graph”. I then wrote the following code, which basically means, that when the Player dies the HUD (aka, Crosshair) will disappear.



I also decided to create a game over screen for the HUD. To do this, I dragged a “Text” onto the screen then typed in “Your Dead” and made it invisible in the “Behaviour”. After that, I then I clicked on the “Behaviour” and pressed “Binding” on the “Invisibility”, which then brought me to a new “Graph”. Afterwards, I copied the above coding and pasted it onto the “Your Dead” graph and changed it so it wasn’t “True” but “False” and that’d be “Visible” when the Player gets killed by the enemy Zombie AI.



The following results look like this on screen;



Monday, 9 April 2018

Week 27

Week 27:

HND Project:

This week I decided to expand upon the coding for the “Enemy Spawner”. I have decided that after a while the Zombie AIs would stop spawning after a certain amount and then continue to re-spawn, when that amount has begun to get depleted. To do this, I first created a new “Integer” variable that I named “EnemiesOut” and set its amount to “15”. I then wrote the following code. 



With this the “Enemy Spawner” has been now fully implemented and does not need anymore tinkering with, at the time be at least. As you can see the Zombie AI will continue to spawn until there at least 15 on them on the Map, that’s when they’ll stop spawning until there number as been depleted. That’s when they’ll start to re-spawn onto the Map once again and continue their usual course. 

Monday, 2 April 2018

Week 26

Week 26:

HND Project

I had another busy week this week, but I’ve managed to do something more with my UE4 Project. Simple-but-effective, I have changed the Skin of the Zombie AI. In the “Construction Script” on my “Enemy” character, I created a new “Linear Color” variable that I named “EnemyColor” and I created the following script. In addition, I found a basic Animation on the Internet that I imported and use as well.