билборды
This commit is contained in:
1 parent
0972c05e3d
commit
15c64d9eb2
9 files changed
+1759
-83
No files matched your search
@@ -1939,6 +1939,7 @@ local function spawnNpc(spot, parent)
|
||||
return nil
|
||||
end
|
||||
rig.Name = name
|
||||
rig:SetAttribute("Npc", true) -- по нему клиент находит NPC (взгляд на игрока, приветствие), сервер — включает idle
|
||||
local hum = rig:FindFirstChildOfClass("Humanoid")
|
||||
hum.DisplayName = name
|
||||
hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
|
||||
@@ -1985,6 +1986,12 @@ local function spawnNpc(spot, parent)
|
||||
elderPart(V(1.0, 0.75, 0.35), CFrame.new(0, -0.55, -0.5), colors.hat)
|
||||
elderPart(V(0.32, 0.3, 0.08), CFrame.new(0.22, 0.12, -0.6), Color3.fromRGB(20, 20, 22))
|
||||
elderPart(V(1.24, 0.08, 1.24), CFrame.new(0, 0.18, 0) * CFrame.Angles(0, 0, math.rad(-12)), Color3.fromRGB(20, 20, 22))
|
||||
elseif spot:GetAttribute("Look") == "Scarf" then
|
||||
-- платок (цвет HatColor): макушка и узелок сзади
|
||||
local s = hatPart(V(1.3, 0.5, 1.3), CFrame.new(0, 0.42, 0.05), Enum.PartType.Block)
|
||||
s.Material = Enum.Material.SmoothPlastic
|
||||
local k = hatPart(V(0.4, 0.4, 0.3), CFrame.new(0, 0.05, 0.62), Enum.PartType.Block)
|
||||
k.Material = Enum.Material.SmoothPlastic
|
||||
else
|
||||
hatPart(V(0.15, 2.0, 2.0), CFrame.new(0, 0.55, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
hatPart(V(0.6, 1.35, 1.35), CFrame.new(0, 0.85, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
|
||||
@@ -1996,6 +2003,7 @@ local function spawnNpc(spot, parent)
|
||||
end
|
||||
return rig
|
||||
end
|
||||
Builder.spawnNpc = spawnNpc -- жители лобби (LobbyLife.server.lua) создаются так же
|
||||
|
||||
-- NPC встают на свои детали-места, доски «кто водится» получают актуальный список рыб
|
||||
function Builder.prepareRuntime(root)
|
||||
@@ -2013,6 +2021,23 @@ function Builder.prepareRuntime(root)
|
||||
spot.Transparency = 1
|
||||
spawnNpc(spot, root)
|
||||
end
|
||||
-- порталы лобби двигают в Studio за модель (PortalModel_WorldN); невидимый якорь с подсказкой и подписью
|
||||
-- (Portal_WorldN) и маркер стрелки обучения (GuidePortal, перед порталом в мир 1) встают к модели
|
||||
for _, model in ipairs(root:GetChildren()) do
|
||||
local id = model.Name:match("^PortalModel_(World%d)$")
|
||||
local anchor = id and root:FindFirstChild("Portal_" .. id)
|
||||
if model:IsA("Model") and anchor then
|
||||
local cf, size = model:GetBoundingBox()
|
||||
anchor.CFrame = CFrame.new(cf.Position.X, cf.Position.Y - size.Y / 2 + 10, cf.Position.Z) * (anchor.CFrame - anchor.Position)
|
||||
local marker = id == "World1" and root:FindFirstChild("GuidePortal", true)
|
||||
if marker then
|
||||
local flat = V(cf.Position.X, 0, cf.Position.Z)
|
||||
local outward = flat.Magnitude > 0.1 and flat.Unit or V(0, 0, 1)
|
||||
local p = flat + outward * 5.7
|
||||
marker.CFrame = CFrame.new(p.X, marker.Position.Y, p.Z) * (marker.CFrame - marker.Position)
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, board in ipairs(boards) do
|
||||
writeBestiary(board)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user