Skip to content

Commit

Permalink
Add bonus "MoveHere" input for animatronic location points
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyFrenzy committed Jan 12, 2025
1 parent a5135d5 commit 1302be2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ function ENT:SetupDataTables()
self:NetworkVar("String", 1, "AnimVal")
end

function ENT:AcceptInput(name, activator, caller, data)
if name == "MoveHere" then
GAMEMODE:SetAnimatronicPos(nil, self:GetAType(), self:GetAPos())
end
return true
end

function ENT:KeyValue(k, v)
if debugmode then print(k, v) end
if k == "AType" then
Expand Down
1 change: 1 addition & 0 deletions gamemodes/fnafgm/fnafgm.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
APos(integer) : "Animatronic position (camera ID)" : 1 : "Which location relative to camera this is. Only one AType+APos combo can exist at a time."
flexes(string) : "Flexes" : : "Flexes to apply at this location. Format like this: flex:weight|flex:weight|flex:weight"
animation(string) : "Animation" : : "Name of the animation to play at this location."
input MoveHere(void) : "Instantly move the animatronic to this location. Only works if the night is started and the animatronic is not on cooldown."
]

@PointClass base(PlayerClass, Angles) studio("models/editor/playerstart.mdl") = fnafgm_teamanimatronics_start : "Spawn point for the animatronic team"
Expand Down

0 comments on commit 1302be2

Please sign in to comment.