Skip to content

Animatronic Abilities

Unique hooks for each animatronic with their own mechanics.

General

fh_animatronic_break_prop(ply, ent, tr) HOOK SERVER

Triggers inside AnimatronicBreakProp(ply,ent), for animatronics with a screamer. tr has the TraceResult structure. Return false — the animatronic cannot break props.

fh_animatronic_post_break_prop(ply, ent, tr) HOOK SERVER

Triggers after AnimatronicBreakProp(ply,ent).

Freddy

FH_BlindRageStart(ply, ent, victim) HOOK SERVER

Freddy has started searching for a target using Blind Rage.

FH_BlindRageFailed(ply, ent, victim) HOOK SERVER

The target avoided Blind Rage, the ability has been canceled.

FH_BlindRageSuccess(ply, ent, victim) HOOK SERVER

The Blind Rage target has been successfully selected.

FH_HandleBlindRageTarget(ply, victim) HOOK SERVER

Determines whether victim can become a potential target for Blind Rage. Return false — the player is immune to Blind Rage target searching.

lua
hook.Add("FH_BlindRageSuccess", "RageChatPrint", function(freddy, ent, victim)
    victim:ChatPrint("Freddy has aggroed on you!")
end)

Bonnie

FH_YoursMineStart(ply, ent, target) HOOK SERVER

Bonnie has activated the "Yours is Mine" ability.

FH_YoursMineSpectating(ply, ent, target) HOOK SERVER

Bonnie has started controlling the target.

FH_YoursMineEnd(ply, ent, target) HOOK SERVER

Bonnie has stopped controlling the target.


Chica

FH_MinePlanted(ply, ent, cupcake) HOOK SERVER

Chica has successfully planted a cupcake mine.

ArgumentTypeDescription
plyPlayerChica
entEntityChica's model
cupcakeEntityThe planted cupcake
lua
hook.Add("FH_MinePlanted", "BigCupcake", function(ply, ent, cupcake)
    -- Make cupcakes 2 times bigger
    cupcake:SetModelScale(2, 0.01)
end)

Shadow Freddy

FH_SFreddySubmergeIn(ply, ent) HOOK SERVER

Shadow Freddy started fading into invisibility.

FH_SFreddySubmergePostIn(ply, ent) HOOK SERVER

Shadow Freddy has fully faded into invisibility.

FH_SFreddySubmergeOut(ply, ent) HOOK SERVER

Shadow Freddy has emerged from invisibility.


Endoskeleton

FH_HandlePlayerGrab(ply, target) HOOK SERVER

The Endoskeleton is trying to grab a player. Return false — the player cannot be grabbed.

fh_endo_release(ply, target) HOOK SERVER

The Endoskeleton has released target.


Golden Freddy

FH_OutworldStart(wgfreddy, victim) HOOK SERVER

Golden Freddy has selected a target for the Outworld Dimension.

FH_OutworldEnd(wgfreddy, victim) HOOK SERVER

The Outworld Dimension has been disabled.


Toy Chica

FH_HandlePlayerHold(ply, target) HOOK SERVER

Toy Chica is trying to grab a player. Return false — the player cannot be grabbed.


Always check validity

Animatronic abilities may be disabled because one of the players left the server. Always use IsValid():

lua
hook.Add("FH_OutworldEnd", "OutworldEndWelcome", function(gfreddy, victim)
    if IsValid(victim) then
        victim:ChatPrint("You have returned to the real world.")
    end
end)