Now to implement player health that interacts with the UI to do this create a C# script in the script folder then drag the script onto the player in the hierarchy, in the components section of the player in the player health section you will see Health slider and damage image with None in the boxes next to them you need to click on the health slider in the hierarchy and drag it onto the box with none which will link the health slider component with the player health script do the same with the damage image box below by dragging the damage image from the hierarchy into the damage image none box to link it.
Posts
- Get link
- X
- Other Apps
Next will be creating the HUD so to start there’s a 2D button located at the top of the scene view which if you click on will change the view to that of 2D which is helpful for setting up the HUD. So, what we want to do is create a canvas which can be done by going the game object tab mouse over UI and clicking on canvas which will then place a canvas in the hierarchy after which rename it from canvas to HUDCanvas (heads up display). Then add a component called Canvas group which allows UI elements to have an alpha and whether their interactable, then uncheck the Block raycasts box. Then right click on HUDCanvas in the hierarchy tab and click create empty which will create a child and rename the gameobject to HealthUI, the benefits to doing it this way instead of creating an empty then linking it to the HUDCanvas is that if you create the child directly unity knows that your trying to add a new HUD element and gives it the rect transform instead of the normal transform. Now to m...
- Get link
- X
- Other Apps
I setup the main camera in an isometric way and to do that we want to use orthographic instead of perspective in the main camera inspector tab. So, in the transform section I set the position x=1, y=15 and z=-22. Then in the row below that, the rotation x=30, y=0 and z=0 after which we change the projection from perspective to orthographic and the size to 4.5 which should now be displayed in the game view tab. After that to make sure the background or the areas outside of the environment aren’t visible click on the colour block next to the background label in the inspector tab which should bring up a colour palette in which you can choose whatever colour you wish I chose black for mine. Next in the projects tab if you haven’t already make a scripts folder in the assets folder then make a camera folder if you want to keep things nice and tidy, then click on the create button and select C# script which will create something named NewBehaviourScript and is important to name the scripts ...
- Get link
- X
- Other Apps
After that I decided to create the player model and enemy for which I used basic 3D shapes such as the capsule for the player and the cube for the enemies which I then made taller. Then select player and make sure you are in the inspector tab of unity and go to add component and add a Rigidbody, do this for both the player and the enemy of which I named cubebot. I also took this moment to add materials and used them to change the colour of the player and cubebot, Red for the player and green for the cubebots as well as making the floor a light blue colour. Next selecting the player and using the inspector node add component and find capsule collider as this will be referenced for hit boxes such as terrain as well as when the cubebots get close enough to attack. We will also give the cubebot in the hierarchy a sphere collider which will help with a trigger later so that when the player enters a specific range the trigger will activate and allow for damage to the player.
- Get link
- X
- Other Apps
I aim to make a small demo using AI elements such as fuzzy logic, pathfinding and more. The game I aimed to make is an asymmetric third person shooter in which enemies, monsters etc would spawn constantly and seek out the player and do damage when they get close enough to the player. Unlike the enemies which can only do damage from a small range or on contact the player will have a gun or something similar that enables them to attack from distance. I started by creating a very basic environment using 3D shapes and stretching or resizing them to what I need such as a floor, walls and obstacles until I had a basic environment that I was satisfied with. I then used the 3D object called a quad which will be used for reference in scripts later and resized to be a little bit larger than the environment. We will also use nav mesh agent later as this helps with pathfinding and more.
- Get link
- X
- Other Apps
Temp Looking at some of the simpler survival shooters i came across a game called nightmare in which you controll a small person armed with an assault rifle and have to hold off waves of enemies consisting of Zombunnies, Zombears and Zombephants and the player is rewarded with a score for killing the enemies. The Zombunnies are worth 10 points with the Zombears being worth 20 and since the Zombephant is a much larger and tougher target it is worth 50 meaning the tougher the enemy the more points they are worth.
- Get link
- X
- Other Apps
Woop This week i have been researching 3D isometric action adventure role playing games (hack n slash). The game i spent the most time looking into is Diablo 3 in which you get a choice of ranged and melee abilities and your character is swarmed with AI mobs that have patrol routes but this type of game would be great with boids flocking added to it so that some enemies huddle together and maybe buff when within a certain distance of each other.