⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    ChamberedReloader MonoBehaviour

    Overview

    The ChamberedReloader behaviour triggers a reload animation and waits until it completes before taking ammo from the firearm's ammo module and adding it to the magazine. The ChamberedReloader will set a bool parameter in the firearm's [AnimatorController][unity-animatorcontroller] so that it can change the animations it plays, and it can have a different wait duration and audio clip to play if reloading from an empty magazine compared to with a round in the chamber.

    Inspector

    ChamberedReloader

    Properties

    Name Type Description
    Start Active Boolean Should this module register as the active reloader immediately on start.
    Activation Mode Dropdown How does module activation work. Options are: Component means the component will be enabled / disabled - use this when you have multiple modules on an object such as the firearm root. GameObject activates / deactivates the object - use this for attachments where you want the geo to appear/disappear.
    Magazine Size Float The number of rounds that can be fit in the magazine at once.
    Starting Magazine Float The number of rounds in the magazine on initialisation.
    Reload Delay Type Dropdown The delay type between starting and completing a reload. The options are None, Elapsed Time, External Trigger.
    Reload Duration Float The time taken to reload.
    Reload Duration Empty Float The time taken to reload if reloading from empty.
    Blocking Duration Float The time taken before you can use the weapon again after the reload starts.
    Blocking Duration Empty Float The time taken before you can use the weapon again after the reload from empty starts.
    Reload Anim Trigger String The [AnimatorController][unity-animatorcontroller] trigger parameter key for the reload animation.
    Empty Anim Bool String The key to an [AnimatorController][unity-animatorcontroller] bool parameter to set when the weapon is empty.
    Reload Speed Parameter String A float parameter in the weapon [AnimatorController][unity-animatorcontroller] that will be assigned the reload speed (use for animation clip playback speed setting on reload animations).
    Reload Audio AudioClip The audio clip to play while reloading.
    Reload Audio Empty AudioClip The audio clip to play if reloading from empty.

    See Also

    Modular Firearms

    FirearmAnimEventsHandler

    [Unity Animator][unity-animator]

    [Unity AnimatorController][unity-animatorcontroller]

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX