The third beginner tutorial is the FPS MicroGame. The beginning of the tutorial is a little different than the other two. The menu structure is also a bit different.
FPS Microgame
At the beginning the game is tested. The aim is to eliminate all opponents.
The player is modified. The height of the character's jump should be set.
This can be found under Gravity Downforce or Gravitation:
In contrast to the other tutorials, the game testing window is not separate.
The second part of the tutorial makes you familiar with the hierarchy window and the scene image. You will learn to zoom in and out like in the other tutorials.
Add rooms
Then you will learn to add rooms from the Prefabs.
With the NavMeshSurface you influence where the opponents can move.
Blue areas can be visited by the opponents. With the option "Bake" the opponents can also enter the new room.
In the following section you will learn to give the floor a new color.
Change the background image
In the following mod you will be shown how to change the background image:
The background image can be selected via Background -> in the Inspector window under Source Image or the circle next to it.
Background image:
Search for Title in the hierarchy window.
You change the title in the inspector window.
In the following mod the sky is changed. That is why HDRI's: Skies searched for a corresponding template. The format of the file is .hdr. You drag this into the project window for import.
Select it in the project window and set the texture shape from 2D to cube in the inspector window.
Change the Max Size to 4096.
After making these changes, select Apply for them to take effect.
Next you create a "material" for it by selecting "Create" in the project window. Then select material and name it e.g. B. as "Sky".
In the Inspector window the shader is changed from Standard to Skybox -> Cubemap.
The Skycube is dragged and dropped into the Inspector window on the right (Select). This completes the completion of the new skybox material.
In the project window you look for the MainScene.
Select Window–> Rendering–> Lightning Settings in the menu for the light settings.
Drag the edited sky from the project window under Assets, into the Skybox material, from the Lightning window that has opened.
Another point in the tutorial is the coloring of objects. This is no different from the process in the other tutorials.
Creating your own color
You can create your own color.
Use Ctrl + D to highlight a color and duplicate it. Then you can rename it. With the tweezers you can define your own color per albedo.
Cookies for healing
The following is about exchanging one healing package for another. You can find it under Pickup Health. In the project window under Prefab there are also further pickups or items for installation.
Fan this out in the hierarchy window down to the lowest level.
For example, drag a selected asset from the Models–> FoodProps under the Mesh_Health_Pickup.
Select the Mesh_Health_Pickup in the hierarchy window and deactivate the tick next to the name in the inspector window.
The "+" sign next to the cookie indicates that changes have been made there.
Then select the parent prefab and open the override window.
If you select Apply All now, all Pickup_Health objects will be transformed into cookies.
In the last part of the tutorial, you choose a robot and put a hat on it.
Stop the damage to the opponents
Find the robot's weapon in the hierarchy window.
In the Inspector window you can make more detailed settings for the enemy shots:
Delay Between Shoot is the distance between shots.
The Bullet Spread Angel is the angle of spread of the balls or shots.
Bullets per shot defines the number of bullets per shot.
The projectile or the projectile prefab is to be changed.
The projectile assets can be found in the project window.
Create a new projectile with Ctrl + D and rename it.
You can adjust the damage in the inspector window.
Now equip the enemy with the new projectile.
Next, the enemy range is set.
With higher numbers, you increase attack range and sensor range.
You can also adjust the eye color when attacking.
Loots from opponents
Enemies drop certain items when defeated. These can vary. There are prefab variants for this.
To do this, select the opponent and look for the loot area in the inspector window. Then you just have to choose another loot.
Other objects can also be "dropped".
Mark the PickupLauncher under the prefabs. Select Create and Prefab Variant.
For example, name it as Loot_Launcher.
Next select the Loot_Launcher in the project window. Right-click and select Open from the drop-down menu at Loot_Launcher.
The hierarchy window now shows the structure of the Loot_Lancher and the scene window the current model in 3D.
Now look for VFX_PickupSparkles in the project window. You drag this to the Loot_Launcher in the hierarchy window.
This must now be assigned to an opponent.
Convert the weapon
First look in the project window under the assets for the weapons or Weapon_Blaster. With a double click you open the prefab.
Select the Weapon Blaster in the hierarchy window, then GunRoot–> WeaponMesh_Pistol
2D must be deactivated.
Then look for the weapon controller in the inspector window.
Here you have the opportunity to change some parameters.
Shoot Type -> from automatic to manual
Delay Between Shots -> influences the time that passes between two shots
Bullet Spreat Angle -> The angles between the bullets that are shot - the higher it is, the less accurate it is
Recoil Force -> This is the recoil
Aim Zoom Ratio -> The higher the value, the larger the zoom
Ammo Reload Rate -> weapon reload rate
Max Ammo -> The bullets or ammunition that a weapon can have
Save your changes.
Configure new projectiles
To create new projectiles, right-click on the GameObject and create a new one with Create Empty. Name the object.
Drag the new object from the hierarchy window into the prefab window to the other projectiles. With a double click you open the prefab.
Select the object in the hierarchy window. Right click on Transform in the Inspector window and go to Reset.
Select AddComponent and then Projectile Standard.
Drag the prefab into the hierarchy window. This will now appear in the scene screen. Go to the scene image and center it with F. Now the components or values can be adjusted under Transform.
Select the NewProjectile in the project window. Drag your selected object there from the hierarchy window to the inspector window and root.
Create another GameObject in the hierarchy window. This forms the projectile tip.
Move the new object to the top of the main object. Move the object from the hierarchy window to the projectile standard at the top of the new object.
Now the object is created that is created when the projectile collides with something. Impact VFX is important at this point. Select the circle next to it.
Then select the asset tab. Here you choose the item that the projectile will transform into.
The next configuration concerns the sound the projectile makes on impact.
Now the projectile is ready. Don't forget to save it. Now you can assign the new projectile to a weapon.
Add physics
In the next part of the tutorial, a different physics will be assigned to the projectile.
Then the cookies or crystals that have been shot do not get stuck in the wall, but fall down.
The shape that was used must be dragged from the project window into the hierarchy window. From there move the crystal back into the project window, to FPS–> Prefabs
Select Original Prefab. Rename the prefab to z. B. CrystalwithPhysic. Now open it with a double click. Right-click and select Reset in the transform area. Set the scale to the size that the crystal should assume after shooting.
Then go to Add Component. You need 2 different ones: Mesh Collider and Rigidbody
The Convexbox must be activated under Mesh Collider.
In the project window, find the projectile prefab that you created earlier. Open it.
Go to Projectile Standard in the Inspector window. Choose the Impact VFX. Select the CrystalwithPhysics. Save and try it out.
Build a level
You use ProGrids to build levels. Check that the main scene is open. First find the Room_Altar prefab and add it to the scene.
Drag it from the project window into the scene. Activate the snap button.
Increase the Snap Value to 1.
Press the Push to Grid button and the object will be attached to the layer.
Giving opponents access to the new room
After placement, select in the main menu -> Window–> AI–> Navigation
Press the "Bake" tab. Now the opponents can enter the new room.
Expand the level
Select the Dungeon folder under the Assets.
Select and place Dun_BigDoor. If necessary, you can now add floors and walls. Don't forget to expand the path of the AI with the beacon function.
Create a NavMesh with a new area
In the NavMesh area create a new area called Lava. Give it the cost value of 23. You can find it under the main menu–> Window–> AI–> tab area Area
Find an opponent prefab in the project window. In the Inspector window you look for the Nav Mesh Agent. Find the area mask. Deactivate the areas in which the AI should not be.
The Objects tab
You have created a new area. Select a special piece of the floor and define it as Laval via the Objects tab. To do this, select an object in the scene or in the hierarchy window. Once you've checked it, select Mesh Renderers. If you are using terrain, choose terrain.
When you have selected the object, the Navigation Area becomes available. Select the desired area in the drop-down menu. Go to the Beacon tab and activate Beacon.
The next part of the tutorial deals with the placement of objects.
The object or asset can be rotated with Ctrl + left mouse button and the activated rotation tool with E. Use the short key W to switch to the movement tool.
The tutorial goes back to the three axes over which objects can be moved.
Increase the character's health
First open the main scene in the project window. Select the player in the hierarchy window. Go to the Inspector window and look for the script for Health. Increase this to a value of your choice.
Another point is changes in character. The Player Character Controller is used for this. For example, Max Speed Ground can be changed here.
Max Speed Ground is the maximum speed on the ground.
Jump Force defines the jump height
Rotation speed affects the rotation speed of the character.
The Jet pack script enables settings for the Jetpack:
Is Jetpack Unlocked at Start: Can unlock the jetpack at the start of the game
Consume Duration: defines the duration of seconds that are required to use up the jetpack filling.
The sound from the Jetpack can also be adjusted under Audio Source.
Here it goes Game from the 2nd tutorial
(Advertising)
Originally posted on 2019-11-08 10:25:00.