Thanks for sharing! I created this micro guide for beginners on how to create a FPS just to practice. Hope it helps!
1- Right Click Blueprint - Game Mode Base
- Top Menu - Window - World Settings
Under World Settings select Game Mode Override - Your Game Mode
2- Blueprint - Character to create the players character
- Open It and ADD Camera
- Drawn a Gun with cubes
- All of the elements of the gun add it to a SCENE
3- Under World Settings - Game Mode - Default Pawn Class - The Player that you just created
4- In the content Drawer
- Right Click - Input - Input Action - Call it LeftAndRight
- Right Click - Input - Input Action - Call it UpAndDown
- Right Click - Input - Input Action - Call it MouseMovement
- Right Click - Input - Input Action - Call it Jump
5- Open LeftAndRight
- Value Type - Float
6- Open UpAndDown
- Value Type - Float
7- Open MouseMovement
- Value Type - Vector2D
8- Open Jump
- Value Type - Boolean
9- In the content Drawer
- Right Click - Input - Input Mapping Context
10- Open Input Mapping Context
- Click on the Plus sign under Mappings
- Select LeftAndRight
- Expand LeftAndRight
- Click on the keyboard button and press âAâ
- Under the âAâ under Modifiers select âNeglateâ
- Next of the LeftAndRight there is a Plus Icon - Click on it
- Click on the keyboard button and press âDâ
- Click on the Plus sign under Mappings
- Select UpAndDown
- Expand UpAndDown
- Click on the keyboard button and press âWâ
- Next of the UpAndDown there is a Plus Icon - Click on it
- Click on the keyboard button and press âSâ
- Under the âSâ under Modifiers select âNeglateâ
- Click on the Plus sign under Mappings
- Select MouseMovement
- Expand MouseMovement
- Next to the keyboard where it says âNoneâ select 'Mouse XY 2D-Axis
- Click on the Plus sign under Mappings
- Select Jump
- Expand Jump
- Click on the keyboard button and press âSpace Barâ
11- Create a new Actor Blueprint for Bullets
- Add a Cube
- Under Transform select
- Location to 0 0 0
- Rotation to 0 0 0
- Scale to 0.75 0.142 0.139
- Under Material create a material for the bullet color and select it in Materials in the Right Pane Options
- Under Physics enable âSimulate Physicsâ, âEnable Gravityâ, and âApply Impulse on Damageâ
---- EVENT GRAPH ----
- From "Event Begin Play Drag a line to look for âAdd Impulseâ
- Create a variable on the left pane called Cube if not present
- Drag the Variable Cube as GET and drag the line to âTargetâ in the Add Impulse
- Right Click to look for a âGet Forward Vectorâ and connect it to the CUBE
- Right Click on the screen and look for Multiply (*)
- In the top Pin select âTo Vectorâ
- In the lower Pin select âTo Float Single Precisionâ and add the value of 80000.0
- From the Get Forward Vector drag a line from âReturn Valueâ to the first yellow pin on the left on the Multiply
- Connect the Second yellow Pin on the right to the âImpulseâ in the Add impulse
- Click on the variable âCubeâ and look for âOn Component Hitâ (Cube) on the right pane
- From the White triangle drag a line to look for a Branch
- True goes to âSpawn Emitter at Locationâ and from there a white line to âDestroy Actorâ
- Under âOn Component Hitâ (Cube) right click in the âHITâ and click âSplit Struct Pinâ to expand and drag a yellow âHit Impact Pointâ to 'Location in âSpawn Emitter at Locationâ
- Under âOn Component Hitâ (Cube) drag a line from âHit Impact Normalâ to look for âRotation from X vectorâ, and from âRotation from X vectorâ to âRotationâ in âSpawn Emitter at Locationâ
- Under âOn Component Hitâ (Cube) drag a line from âOther Componentâ to look for âGet Collision Object Typeâ and from there look for âEqual Enumâ and from the equal num in the dropdown select âWorldStaticâ, and from the red pin connect it to the condition in the Branch
- False goes to another branch
- True goes to âApply Damageâ
- In âOn Component Hitâ (Cube) from blue Other Actor drag the line to âDamage Actorâ in the âApply Damageâ
- In âOn Component Hitâ (Cube) from blue Other Actor drag the line to âActor Has Tagâ and type âBadGuyâ and the return value connect it to this Branch
- In the âApply Damageâ in the green âBase Damageâ put 10.0
- From âApply Damageâ drag a white line âDestroy Actorâ
- False goes to âDelayâ with the duration of 2.0 and Completed goes to âDestroy Actorâ
12- Open your Player Blueprint
---- VIEWPORT ----
- Add a Camera under the Capsule component
- Under the Camera add the Gun (draw the gun)
- Under the Camera add an ARROW and call it GUN NOZZLE and point it forward where the bullets will spawn
- Create Variable Health and MaxHealth, compile and set the Health as 100 and MaxHealth as 100
- On the right pane look for TAG and type âGoodGuyâ
---- EVENT GRAPH ----
- Under event Graph - Get Player Controller
- Drag a line from Return Value and look for âGet Enhanced Input Local Player Subsystemâ (Pink)
- Drag a line from the Get Enhanced to look for âAdd Mapping Contextâ
- Under Add Mapping Context select the created Mapping Context
- Connect the Add Mapping context to âEvent Begin Playâ
- Right Click and look for the UpAndDown function and expand it
- Right click and look for âAdd Movement Inputâ and join with âTriggeredâ
- Right click and look for âGet Actor Forward Vectorâ and join to âWorld Directionâ
- Connect the green Action Value to Scale Value
- Right Click and look for the LeftAndRight function and expand it
- Right click and look for âAdd Movement Inputâ and join with âTriggeredâ
- Right click and look for âGet Actor Right Vectorâ and join to âWorld Directionâ
- Connect the green Action Value to Scale Value
- Right Click and look for the MouseMovement function and expand it
- Right click and look for âAdd Controller Yaw Inputâ and join with âTriggeredâ
- In the âMouseMovementâ in the Blue âAction Valueâ right click to âSplit Struct Pinâ
- From MouseMovement âAction Value Xâ to âValâ in Yaw
- Right click and look for âAdd Controller Pitch Inputâ and join with âAdd Controller Yaw Inputâ
- From MouseMovement âAction Value Yâ to â*â (Multiply) upper pin and lower pin = â-1â to âValâ in Pitch
- Select the Playerâs Camera and from the options on the right, select âUse Pawn Control Rotationâ
- Right Click and look for the Jump function and expand it
- Right click and look for âJumpâ with the blue f and join with âStartedâ
- Right click and look for âStop Jumpingâ with the blue f and join with âCompletedâ
- Right Click to create a Custom Event and call it RapidFire
- Create a Boolean Variable called âLeftButtonIsDownâ and drag a Get in the blueprint
- Connect a Branch to the Custom Event RapidFire, Connect the LeftButtonIsDown to Condition
- In the branch True drag the line to look for âSpawnActor Classâ and select class âBulletsâ
- Drag the âGun Noozleâ and put it as GET
- Right click to look for âGet World Locationâ, âGet World Rotationâ, and âGet World Scaleâ and connect it in âSpawnActor Bulletsâ split Spawn Transform and in the âSpawn Transform Locationâ, âSpawn Transform Rotationâ, and âSpawn Transform Scaleâ respectively. Connect the âGun Nozzleâ to the âGet World Locationâ, âGet World Rotationâ, and âGet World Scaleâ in the blue Target.
- From the âSpawnActor Bulletsâ drag a white line to look for Delay and set it to 0.05, and from Delay drag the white line to âRapidFireâ to loop again from the custom event
- Right Click to look for âLeft Mouse Buttonâ
- From the LeftButtonIsDown Boolean variable drag two (2) SET
- Connect one with Pressed and click on the check left button is down to make it True, and from that SET drag a white line to look for RapdiFire to loop again while the left button is being pressed.
- Connect the other one to the âReleasedâ and leave it like that.
13- Create the GUI
- Right Click on the Content Drawer and select User Interface - Widget Blueprint
- Add a Progress bar and add it as a Variable and call it âPlayer Healthâ, compile it
14- Connect Player to ViewUI GUI
- From the âAdd Mapping Contextâ from the right size drag a white line to look for âCreate Widgetâ and in the class select the Widget
- In the purple Class look for the created GUI
- Create the Variable View UI and where you select the Boolean or float, look for the name of the Widget you created, and drag a SET in the blueprint
- Form the âCreate View UI Widgetâ connect the white line to the SET and the blue Return Value to the SET
- From the SET on the right drag a white line to look for âAdd to Viewportâ and also the blue line to Target
- From the âAdd to ViewPortâ drag a white line and look for Sequence
- From Sequence drag a white line to look for Set Percentage
- Drag the View UI to GET, and from the GET drag a line to look for the âPlayer Healthâ and drag a line to look for âSet Percentageâ
- Drag the Health and MaxHealth GET and connect it to a â/â and connect it to âIn Percentâ in the Set Percent
- Drag a white line from Set Percent to look for âBind Event on Take Any Damageâ and look also for custom âOnTakeAnyDamage Eventâ !!!
- Connect âBind Event on Take Any Damageâ from the red Event to âOnTakeAnyDamage Custom Eventâ
- Drag a SET Health and connect it to the âOnTakeAnyDamage Eventâ
- Create a Minus â-â and connect the upper pin to the Health GET variable, Lower left pin to the Damage in the âOnTakeAnyDamage Eventâ, and Upper right pin to the left SET Health. Connect the âDamageâ from the âOnTakeAnyDamage Custom Eventâ to the minus â-â lower pin
- From SET Health drag a white line to look for Set Percentage
- Drag the View UI to GET, and from the GET drag a line to look for the âPlayer Healthâ and connect it to the Target in âSet Percentageâ
- Drag the Health and MaxHealth GET and connect it to a â/â and connect it to âIn Percentâ in the Set Percent
- Create a GUI for the Dead Player
- Drag a white line from the Set Percent to a Branch
-Drag a GET Health and right click a â<=â to connect it to the GET Health
- Connect the red pin to the Condition on the branch
- In the branch TRUE drag a white line to look for âOpen Level By Object Referenceâ and select the Dead GUI
15- In the GAME MODE BASE
- Create the ViewUI variable
- From âEvent BeginPlayâ drag a white line to look for âCreate View UI Widgetâ and in the purple class select the ViewUI created
- Drag the ViewUI variable SET and Connect it to the âCreate View UI Widgetâ in the white line and blue return variable
- From the ViewUI variable SET and Connect it to the âAdd to ViewPortâ
16- Create a new Actor Blueprint for EnemyBullets
- Add a Cube
- Under Transform select
- Location to 0 0 0
- Rotation to 0 0 0
- Scale to 0.75 0.142 0.139
- Under Material create a material for the bullet color and select it in Materials in the Right Pane Options
- Under Physics enable âSimulate Physicsâ, âEnable Gravityâ, and âApply Impulse on Damageâ
---- EVENT GRAPH ----
- From âEvent BeginPlayâ Drag a line to look for âAdd Impulseâ
- Create a variable on the left pane called Cube if not present
- Drag the Variable Cube as GET and drag the line to âTargetâ in the Add Impulse
- Right Click to look for a âGet Forward Vectorâ and connect it to the CUBE
- Right Click on the screen and look for Multiply (*)
- In the top Pin select âTo Vectorâ
- In the lower Pin select âTo Float Single Precisionâ and add the value of 1000000.0
- From the Get Forward Vector drag a line from âReturn Valueâ to the first yellow pin on the left on the Multiply
- Connect the Second yellow Pin on the right to the âImpulseâ in the Add impulse
- Right click and look for âOn Component Hitâ (Cube)
- From the White triangle drag a line to look for a Branch
- True goes to âSpawn Emitter at Locationâ and from there a white line to âDestroy Actorâ
- Under âOn Component Hitâ (Cube) expand and drag a yellow âHit Impact Pointâ to 'Location in âSpawn Emitter at Locationâ
- Under âOn Component Hitâ (Cube) drag a line from âHit Impact Normalâ to look for âRotation from X vectorâ, and from âRotation from X vectorâ to âRotationâ in âSpawn Emitter at Locationâ
- Under âOn Component Hitâ (Cube) drag a line from âOther Componentâ to look for âGet Collision Object Typeâ and from there look for âEqual Enumâ and from the equal num in the dropdown select âWorldStaticâ, and from the red pin connect it to the condition in the Branch
- False goes to another branch
- True goes to âApply Damageâ
- In âOn Component Hitâ (Cube) from blue Other Actor drag the line to âDamage Actorâ in the âApply Damageâ
- In âOn Component Hitâ (Cube) from blue Other Actor drag the line to âActor Has Tagâ and type âGoodGuyâ and the return value connect it to this Branch
- In the âApply Damageâ in the green âBase Damageâ put 3.0
- From âApply Damageâ drag a âSpawn Emitter at Locationâ and connect with 'On Component Hit (cube) âHit Locationâ to Location in Spawn Emitter at Location
- Drag a white line from âSpawn Emitter at Locationâ to âDestroy Actorâ
- False goes to âDelayâ with the duration of 2.0 and Completed goes to âDestroy Actorâ
17- Create your ENEMY Blueprint (Character)
---- VIEWPORT ----
- Inside the Capsule create the enemy as a Cilinder
- Inside the Capsule ADD a Scene and put it in the head of the enemy and call it EnemyScene
- Create a Gun next to the Cilinder but Inside the Cilinder
- Inside the gun add a GunArrow
- Create a Float variable called Health, compile and set it to 100
- Create a Float variable called Damage, compile and set it to 5
- Create a Boolean variable called isDead, compile it.
- Create a Boolean variable called canShoot, compile it.
- Create a Float variable called DistanceToPlayer, compile it
---- EVENT GRAPH ----
- On the right pane look for TAG and type âBadGuyâ
â ENEMYâS LIFE â
- Right Click to look for âEvent AnyDamageâ
- Drag SET and GET Health and connect the GET Health to â-â setting it up 10.0, and from the â-â right pin to the health SET green pin
- From the SET Health on the right drag a white line to a âPrint Stringâ and from the right green pin in SET Health to the pink pin in the Print String
- From the Print String drag a white line to look for a Branch
- Drag a new GET Health and right click to add a â<=â and set it to 0.0, and connect them to the Condition in the branch
- From the TRUE, connect it to a isDead SET Boolean and click on the checkbox to make it true
- Connect the isDead SET Boolean with the âDestroy Actorâ
â ENEMY LOOKING AT YOU â
- Create Custom Event called âEnemyLookingAtYouâ
- Drag a white line to look for âSet Actor Rotationâ
- Right click to look for âFind Look at Rotationâ and connect from return value to âNew Rotationâ in âSet Actor Rotationâ
- Right click to look for âGet Actor Locationâ and connect it to âStartâ in the âFind Look at Rotationâ
- Right click to look for âGet Player Pawnâ and connect it in the blue pin to look for âGet Actor Locationâ in the Target pin, and from the Return Value to the âTargetâ in the âFind Look at Rotationâ
- Connect âSet Actor Rotationâ to âSet World Rotationâ
- Drag the GET GunArrow and connect it to the âTargetâ in the âSet World Rotationâ
- Right click to look for âFind Look at Rotationâ and connect from return value to âNew Rotationâ in âSet World Rotationâ
- Right click to look for âGet Player Pawnâ and connect it in the blue pin to look for âGet Actor Locationâ in the Target pin, and from the Return Value to the âTargetâ in the âFind Look at Rotationâ
- Drag the GET GunArrow and Right click to look for âGet World Locationâ and connect it to âStartâ in the âFind Look at Rotationâ
â ENEMY SHOOT AT YOU â
- Create a custom event called âShootPlayer1â
- Drag a white line and look for a Branch and also Drag a GET isDead Boolean Variable and connect it to the condition in the branch
- From the FALSE drag a white line and look for âSpawnActor EnemyBulletsâ
- Drag a SET GunArrow and connect it to âGet World Transformâ
- From âGet World Transformâ Split the return and then connect âReturn Value Locationâ, âReturn Value Rotationâ, and âReturn Value Scaleâ to the âSpawn Transform Locationâ, âSpawn Transform Rotationâ and âSpawn Transform Scaleâ respectively
- From âSpawnActor EnemyBulletsâ on the right drag a white line to look for delay and add 0.5 for delay, and then right click from there to âShootPlayer1â
- From the âShootPlayer1â drag a white line to look for a branch, in the condition drag the Health variable and connect it to â<=â set it to 0 and connect it in the condition of the branch
- For the TRUE
- Drag a Delay and set it to 2.0 and from there drag a white line to look for a branch
- From the branch drag the isDead Bool Variable and connect it to the condition
- From the TRUE branch drag a white line to look for âDestroy Actorâ
- For the FALSE
- Drag a canShoot bool variable SET and then connect it to a Delay and set it to 1.0 and from the delay again a canShoot bool variable SET this tome with the checkbox on
â ENEMY AND YOU LOCATION â
- Create a Custom Event called âTrackâ
- Drag a âDistanceToPlayerâ SET and connect it to the custom event âTrackâ
- Right click and look for âDistance2D Vectorâ and connect it in the right pin to SET DistanceToPlayer
- Right click and look for âGet Actor Locationâ and connect it to the V1 for the Distance2D Vector
- Right click and look for âGet Player Pawnâ to then Right click and look for âGet Actor Locationâ and connect it to the V2 for the Distance2D Vector and also from âGet Player Pawnâ to the âGet Actor Locationâ
- Drag a white line from âDistanceToPlayerâ to look for a âDraw Debug Stringâ
- Drag the EnemyScene GET and right click to connect to âGet World Locationâ and the âGet World Locationâ connect it to âDraw Debug Stringâ
- Right click and look for âFormat Textâ and inside the Format type âDistance: {DisVar}â to create the variable in the Format Text and connect the Result pink pin to the Text in the âDraw Debug Stringâ
- Connect the DisVar from the Format Text to the SET âDistanceToPlayerâ right green pin
- Connect the SET âDistanceToPlayerâ white line to the âDraw Debug Stringâ
- Take a note of the distance because you have to modify it in the âEnemyâs Behaviourâ otherwise set it to 1000.0
- Connect âEvent BeginPlayâ to the custom event âTrackâ
â ENEMYâS BEHAVIOUR â
- From âEvent Tickâ drag a white line and look for the custom event âTrackâ
- Form the Track custom event drag a white line to look for a branch
- Drag the GET âDistanceToPlayerâ and connect it to â<â and set it to a desired distance from the Track custom event that we did
- Connect the red pin to the Branch in the Condition
- From the Branch from the TRUE drag a white line and look for Custom Event called âEnemyLookingAtYouâ
- From the Custom Event called âEnemyLookingAtYouâ drag a white line and look for âDo Onceâ and from there call the custom event âShootPlayer1â