NPC

NPC

ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μ‚¬μš©λ˜λŠ” NPC κ°œμ²΄μ—μš”.

ν•¨μˆ˜

UI HUDλ₯Ό 뢙일 수 μžˆμ–΄μš”. (λΆ™ν˜€ 질 UI 이름, 뢙일 UI Screen, Enum.UIDisplayType.νƒ€μž… )

-- μƒ˜ν”Œ --

local npc = Script.Parent
local AddUI = HUD.PlayerNameUI

wait(2)
npc:AddNPCHUD("NameUI", AddUI, Enum.UIDisplayType.Billboard)

local npcNameUI = npc:GetNPCHUD("NameUI")
npcNameUI.Text:SetText("μš©κ°ν•œ 기사")

UI HUDλ₯Ό μ œκ±°ν•΄μš”. (μ œκ±°ν•˜κ³  싢은 UI 이름)

-- μƒ˜ν”Œ --

local npc = Script.Parent
local AddUI = HUD.PlayerNameUI

npc:AddNPCHUD("NameUI", AddUI, Enum.UIDisplayType.Billboard)

wait(5)
npc:RemoveNPCHUD("NameUI")

ν˜„μž¬ μΊλ¦­ν„°μ˜ λͺ¨λ“  UI HUDλ₯Ό μ œκ±°ν•΄μš”.

-- μƒ˜ν”Œ --

local npc = Script.Parent
local AddUI = HUD.PlayerNameUI

npc:AddNPCHUD("NameUI", AddUI, Enum.UIDisplayType.Billboard)

wait(5)
npc:RemoveNPCAllHUD()

UI HUDλ₯Ό 얻을 수 μžˆμ–΄μš”. (얻고싢은 UI 이름)

-- μƒ˜ν”Œ --

local npc = Script.Parent
local AddUI = HUD.PlayerNameUI

wait(2)
npc:AddNPCHUD("NameUI", AddUI, Enum.UIDisplayType.Billboard)

local npcNameUI = npc:GetNPCHUD("NameUI")
npcNameUI.Text:SetText("μš©κ°ν•œ 기사")

NPC의 이름을 얻을 수 μžˆμ–΄μš”.

-- μƒ˜ν”Œ --

local NPC = Script.Parent
print(NPC:GetNPCName())

NPC의 이름을 μ„€μ • ν•  수 μžˆμ–΄μš”.

-- μƒ˜ν”Œ --

local NPC = Script.Parent
NPC:SetNPCName("기사")

μ‚¬μš© κ°€λŠ₯ν•œ λΆ€λͺ¨ 였브젝트 κΈ°λŠ₯λ“€

속성

이벀트

ν•¨μˆ˜

Last updated