How to make sniper rifle in Shooter game example

Please help me, I want to add a sniper rifle which I made in shooter game example so that I can make a test sniper based game.I am unable to make sniper scope for my game.

For this you need to know C++ fairly well. The Shootergame weapons are spawned in the C++ code straight into the character’s inventory and are (I’d say) impossible to override in blueprints. Some parts of them can be, but for example the right button zoom is in the camera update function and it’s not a separate function so it can’t be overridden without touching the code.

I’d suggest using the First Person Shooter example game in blue prints and following this tutorial: Zoomable Scope. Atleast enough to make you familiar with the mechanics of the zoom, the HUD and various other bits and pieces.

If you wish to delve into the C++, you need to make a child class of ShooterWeapon_Instant, modify it to your sniper rifle specs, make it spawn in the ShooterCharacter.cpp and then change the ShooterCharacter::UpdateCamera() function to recognise when you wield the sniper rifle, so it takes your custom HUD and zoom. The UpdateCamera() function already has a sort of zoom, so modifying that part should be fairly easy. The tricky part is going to be adding the weapon in.