FPS ENGINE DOCUMENTATION
  • Welcome to FPS Engine!
  • BEFORE WE START
    • Early Considerations
    • List of Tutorials
    • List of Add-Ons & Compatible Packages
  • GETTING STARTED
    • 01. Basic set-up
    • 02. Roadmap
  • CONTENT
    • 03. Content
      • 03.1 CAMERA
        • MoveCamera
        • CameraFOVManager
      • 03.2 MOVEMENT
        • PlayerMovement
      • 03.3 PLAYER
        • PlayerStats
        • PlayerMultipliers
        • PLAYER STATES
          • PlayerStates
          • PlayerBaseState
          • PlayerStateFactory
        • WEAPON STATES
          • WeaponStates
          • WeaponBaseState
          • WeaponStateFactory
        • Player Debugging
      • 03.4 WEAPONS
        • Weapon_SO
        • WeaponIdentification
        • WeaponController
        • Bullet
        • ATTACHMENTS
          • Attachment.cs
            • Barrel.cs
            • Flashlight.cs
            • Magazine.cs
            • Scope.cs
            • Stock.cs
            • Laser.cs
            • Grip.cs
          • AttachmentIdentifier_SO.cs
      • 03.5 PICK UP SYSTEM
        • InteractManager
        • Interactable
        • Item_SO
        • Identifiable
        • Pickeable
          • WeaponPickeable
          • BulletsPickeable
          • AttachmentPickeable
      • 03.6 ENEMIES
        • IDamageable
        • EnemyHealth
        • TrainingTarget
        • CIrcularTargetEnemy
        • Turret
        • TurretProjectile
      • 03.7 EFFECTS
        • CameraEffects
        • CamShake
        • CrouchTilt
        • JumpMotion
        • ProceduralShot
        • ProceduralShot_SO
        • WeaponEffects
        • WeaponSway
      • 03.8 UI
        • CowsinsButton
        • Crosshair
        • CrosshairShape
        • Hitmarker
        • UIController
        • UIEvents
        • RebindUI
      • 03.8 EXTRA
        • Checkpoint
        • Coin
        • Compass
        • CompassElement
        • Destructible
        • Crate
        • ExplosiveBarrel
        • PowerUp
        • DamageMultiplier
        • HealMultiplierPowerUp
        • Healthpack
        • DoorInteractable
        • Experience
        • GetGameInformation
        • HurtTrigger
        • JumpPad
        • Lootbox
        • PauseMenu
        • PointCapture
        • Trigger
        • DraggableButtonInSceneView
        • UTILITIES
          • DestroyMe
          • IgnoreCollision
          • LookAt
          • CowsinsUtilities
      • 03.09 MANAGERS
        • CoinManager
        • ExperienceManager
        • GameSettingsManager
        • InputManager
        • SoundManager
        • PoolManager
  • HOW TO USE
    • Getting Started: First Steps
    • Importing FPS Engine into URP / HDRP
    • Add a Player Controller
    • Adding New Weapons
    • Saving & Loading Presets
    • Changing Keybindings
    • Creating New Pickeables
    • Controllable & Not Controllable Player
    • Adding New Surfaces ( Grounds )
    • Working with Attachments
    • Modify Weapon and Camera Effects
    • Adding Custom Key Rebinds
    • Add breakable (Destructible) objects
    • Custom Shot Weapons
    • Adding Enemies
  • FAQ
    • FAQ
  • SUPPORT
    • Support
Powered by GitBook
On this page
  • SIMPLE ENEMIES
  • COMPLES / ADVANCED ENEMIES ( Supports Body Shots, Head Shots )
Export as PDF
  1. HOW TO USE

Adding Enemies

PreviousCustom Shot WeaponsNextFAQ

Last updated 10 months ago

Refer to this tutorial for instructions on adding . This section of the documentation will cover the same steps in detail.

In FPS Engine you can make simple enemies or advanced / complex enemies. The procedure is very simple for both, so let´s get into it:

SIMPLE ENEMIES

If you want an object to be an Enemy in FPS Engine, you will need this object to have a collider. Then, attach EnemyHealth.cs to it, and modify the parameters as you like. Finally, add the “Enemy” tag and the “Enemy” layer.

If you have no missing references on EnemyHealth component, you should now be able to damage your enemy!

COMPLES / ADVANCED ENEMIES ( Supports Body Shots, Head Shots )

Sometimes, you might be working on an enemy that can receive headshots or requires different collisions for various body parts. FPS Engine supports advanced enemies like these!

First, create an object to act as the parent of the enemy. Attach the EnemyHealth component to this object and configure the parameters as desired. Inside this parent object, place your models and set up the collisions. There are two types of collisions: BodyShots and CriticalShots/HeadShots.

BODY SHOTS SET-UP

Your body shot collision will need to have the “Enemy” layer assigned, and the “BodyShot” tag assigned, as well as a collider.

CRITICAL / HEADSHOTS SET-UP

Your head shot collision will need to have the “Enemy” layer assigned, and the “Critical” tag assigned, as well as a collider.

Just like this, you are ready to damage your enemies and deal damage depending on the hit zone.