Skip to content

Commit

Permalink
Implement MakeMultipleNPCS in npc_template_maker
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Jul 21, 2024
1 parent 13ce8a6 commit d6c2abc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions entities/entities/npc_template_maker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,16 @@ function ENT:MakeNPCInLine()
self:UpdateScaling()
end

function ENT:MakeMultipleNPCS()
Error("MakeMultipleNPCS not implemented")
function ENT:MakeMultipleNPCS(data)
local numNpcs = tonumber(data)
local inRadius = self.DestinationGroup ~= nil and self.Radius > 0.1
for i = 1, numNpcs do
if inRadius then
self:MakeNPCInRadius()
else
self:MakeNPC()
end
end
end

function ENT:ChangeDestinationGroup(data)
Expand Down

0 comments on commit d6c2abc

Please sign in to comment.