:DitoLand
Studio ManualAPI ReferenceVideo TutorialSample
  • DitoLand Developer
  • πŸ“šGlossary
  • πŸ₯³EVENT
    • 2024 λ©”νƒ€λ²„μŠ€ 개발자 κ²½μ§„λŒ€νšŒ
    • 🎊[μ’…λ£Œ] πŸ–₯ μ „λ‚¨κ΄€κ΄‘λ©”νƒ€λ²„μŠ€ μŠ€νƒ¬ν”„ νˆ¬μ–΄ 인증 이벀트
  • Notice
    • μ•½κ΄€ κ°œμ •(2024.06.17)
    • μ•½κ΄€ κ°œμ • (2024.03.04)
    • μ•½κ΄€ κ°œμ • (2023.08.25)
    • μ•½κ΄€ κ°œμ • (2022.12.14)
  • Manual
    • Studio
    • Resources
    • Studio Workflow Tips
    • NPC
    • NavMeshVolume
    • Land Teleport
    • Enterprise Account
    • Enterprise Studio Manual
    • Coroutine
    • AddTimeEvent
    • SaveUserData
    • Set Object Parameter
    • Toolbox Upload
    • Debugging (Breakpoint)
    • Gun Toy
    • Coupon / Event Key
    • Optimization
    • AI FSM
    • SpreadSheet
    • Mod Kit
    • AddReplicateValue / ConnectChangeEventFunction
    • Event Execution Order
    • WorldTree Search Filter
    • Object
    • Coordinate
    • Inworld Product
    • Management UserData & Leaderboard
    • Channel
    • World Event
    • Matchmaking
    • Collecting Game Logs
    • External Avatar
  • Coding Style
  • API Reference
    • Global
      • Variables
    • Lua
      • Built-in
      • NotSupport
    • Enums
      • AttachPoint
      • Bone
      • CharacterType
      • ChatCategoryType
      • ChatVisibleType
      • CollisionResponse
      • ControlMode
      • DivideTeamType
      • EventKeyState
      • InputMode
      • InventoryState
      • Key
      • KeyInputType
      • LuckyDrawOrderState
      • MaterialType
      • MediaStateType
      • ModeAnimStateType
      • ObjectSelectType
      • ObjectType
      • PathFollowingStatus
      • PointSpawnType
      • ProgressFillType
      • ProjectionType
      • QuickSlotState
      • ReplicateType
      • ScrollOrientationType
      • SimulatePhysicsType
      • SpawnType
      • TeamType
      • TeleportErrorType
      • TouchType
      • TransformPlayType
      • UIDisplayType
      • UIWidgetType
      • WidgetAnchorType
    • Common
      • BindEvent
      • Character
      • Collision
      • Color
      • CouponReturnData
      • DateTime
      • Environment
      • EventKeyReturnData
      • FactorPhysics
      • FiniteState
      • FiniteStateMachine
      • Game
      • GameStatisticsData
      • HitResult
      • Item
      • LandTransferData
      • Matrix
      • MouseHitResult
      • Object
      • Physics
      • ScriptPhase
      • TimeEvent
      • Track
      • Vector
      • WorldObject
    • Client
      • AnimStateBase
      • AnimStateMachine
      • AnimStateMachineSetting
      • BlendAnimationDataSetting
      • BlendAnimState
      • BlendAnimStateSetting
      • Button
      • Camera
      • CameraClient
      • Character
      • CharacterAnimationSetting
      • CharacterAppearanceSetting
      • CharacterBaseSetting
      • CharacterClient
      • CharacterSetting
      • Collider
      • Collision
      • DPad
      • Environment
      • FiniteStateMachine
      • Frame
      • FX
      • Game
      • GridBox
      • HyperLinkButton
      • Image
      • Input
      • InputGroup
      • InventoryBox
      • Item
      • ListView
      • LocalPlayer
      • Media
      • MediaView
      • NPC
      • ObjectGroup
      • ObjectNoneClient
      • PDFView
      • Physics
      • PointLight
      • ProgressBar
      • RemotePlayer
      • ScreenButton
      • ScreenUI
      • Script
      • ScrollBox
      • SequenceAnimState
      • SequenceAnimStateSetting
      • Sound
      • SpotLight
      • StaticMesh
      • SurfaceUI
      • Text
      • TextBox
      • UIScene
      • WebBrowser
      • WebForum
      • WidgetBase
      • YouTubeView
    • Server
      • Character
      • CharacterAnimationSetting
      • CharacterAppearanceSetting
      • CharacterBaseSetting
      • CharacterServer
      • CharacterSetting
      • Collider
      • Collision
      • Environment
      • FactorPhysics
      • FiniteStateMachine
      • FX
      • Game
      • Item
      • Media
      • NPC
      • Physics
      • Player
      • PointLight
      • Script
      • ScriptObjectGroup
      • ScriptObjectNoneServer
      • Sound
      • Spawner
      • SpawnPoint
      • SpawnPointGroup
      • SpotLight
      • StaticMesh
      • Team
      • UIScene
      • Widget
  • Tutorial
    • Script Tutorial
      • 슀크립트 심화 κ°•μ’Œ
        • 1. 슀크립트의 μ’…λ₯˜, 호좜 μˆœμ„œ, 호좜, 톡신
        • 2. 동기화, νŒŒλΌλ―Έν„°, μ˜ˆμ™Έμ‚¬ν•­
        • 3. λ””ν† λžœλ“œλ‘œ 루아 ν™œμš©ν•˜κΈ°
  • Sample
    • Scripting
    • Event
    • Collision & Physics
    • Transform
    • UI
    • Camera
    • Input
    • FX
    • Sound
  • Guide for Developers
    • Guide For Unity Developer
    • Guide For Roblox Developer
  • Release Note
    • Script Changes
      • 1.5.0 Map Changes
      • 1.2.0 Map Changes
      • 1.1.0 Map Changes
      • 1.0.0 Map Changes
      • 0.9.0 Map Changes
      • 0.7.0 Map Changes
      • 0.6.0 Map Changes
      • 0.5.0 Map Changes
      • 0.4.0 Map Changes
      • 0.3.0 Map Changes
      • 0.2.0 Map Changes
    • Known Issues
Powered by GitBook
On this page
  • NPC
  • ν•¨μˆ˜
  • μ‚¬μš© κ°€λŠ₯ν•œ λΆ€λͺ¨ 였브젝트 κΈ°λŠ₯λ“€
  • 속성
  • 이벀트
  • ν•¨μˆ˜

Was this helpful?

  1. API Reference
  2. Server

NPC

NPC

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

ν•¨μˆ˜

void MoveToLocation(Vector Target)

캐릭터가 λͺ©ν‘œ μ§€μ κΉŒμ§€ κΈΈμ°ΎκΈ°λ₯Ό μ΄μš©ν•΄ μ΄λ™ν•©λ‹ˆλ‹€. (NavMeshVolumeλ₯Ό λ°°μΉ˜ν•΄μ•Ό λ™μž‘ν•΄μš”.)

-- μƒ˜ν”Œ --

local npc = Script.Parent
local goalPos = Workspace.Cube.Transform.Location

wait(3)
npc:MoveToLocation(goalPos) --ν•΄λ‹Ή μ§€μ κΉŒμ§€ 길찾기둜 μ΄λ™ν•΄μš”.

void StopMovement()

μΊλ¦­ν„°μ˜ κΈΈμ°ΎκΈ° 이동을 μ€‘μ§€ν•©λ‹ˆλ‹€.

-- μƒ˜ν”Œ --

local npc = Script.Parent
local goalPos = Workspace.Cube.Transform.Location

wait(3)
npc:MoveToLocation(goalPos) --ν•΄λ‹Ή μ§€μ κΉŒμ§€ 길찾기둜 μ΄λ™ν•΄μš”.

wait(5)
npc:StopMovement() --진행쀑인 κΈΈμ°ΎκΈ°λ₯Ό μ€‘μ§€ν•΄μš”.

PathFollowingStatus GetPathFollowingStatus()

μΊλ¦­ν„°μ˜ κΈΈμ°ΎκΈ° 이동 μƒνƒœμž…λ‹ˆλ‹€.

-- μƒ˜ν”Œ --

local npc = Script.Parent
local goalPos = Workspace.Cube.Transform.Location

wait(3)
npc:MoveToLocation(goalPos) --ν•΄λ‹Ή μ§€μ κΉŒμ§€ 길찾기둜 μ΄λ™ν•΄μš”.
print(npc:GetPathFollowingStatus()) --λŒ€μƒμ˜ κΈΈμ°ΎκΈ° μƒνƒœλ₯Ό 숫자둜 λ°˜ν™˜ν•΄μš”.

void MoveForward(number Value)

μ„€μ •λœ 이동 νƒ€μž…μ— 따라 μ•žμœΌλ‘œ μ΄λ™μ‹œμΌœμš”. (1 : μ „μ§„, -1 : ν›„μ§„ 이동)

-- μƒ˜ν”Œ --

local npc = Script.Parent

local function update(updateTime)
    npc:MoveForward(-1) --1이면 μ „μ§„, -1이면 ν›„μ§„ν•΄μš”
end
npc.OnUpdateEvent:Connect(update)

void MoveRight(number Value)

쒌, 우둜 μ΄λ™μ‹œμΌœμš”. (-1 : 쒌츑, 1 : 우츑 이동)

-- μƒ˜ν”Œ --

local npc = Script.Parent

local function update(updateTime)
    npc:MoveRight(-1) --1이면 우츑, -1이면 쒌츑으둜 μ΄λ™ν•΄μš”
end
npc.OnUpdateEvent:Connect(update)

void Jump()

μ ν”„λ™μž‘μ„ μ‹€ν–‰ν•΄μš”.

-- μƒ˜ν”Œ --

local npc = Script.Parent

wait(5)
npc:Jump() -- μ ν”„λ™μž‘μ„ μ‹€ν–‰ν•΄μš”.

string GetNPCName()

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

-- μƒ˜ν”Œ --

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

void SetNPCName(string Name)

-- μƒ˜ν”Œ --

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

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

속성

이름

μ„€λͺ…

μΊλ¦­ν„°μ˜ κ°€μ‹œμ„±

μΊλ¦­ν„°μ˜ Matring μ—μš”

캐릭터 μœ„μΉ˜κ°’μ΄μ—μš”.

캐릭터 νšŒμ „κ°’μ΄μ—μš”.

객체 ν™œμ„±ν™” μ—¬λΆ€

객체의 Matrix

객체의 Local Transform

객체의 μœ„μΉ˜ Vector

객체의 λ‘œμ»¬μ’Œν‘œ Vector

객체의 νšŒμ „ Vector

객체의 둜컬 νšŒμ „ Vector

객체의 크기 Vector

객체의 κ°€μ‹œμ„±

이벀트

이름

μ„€λͺ…

생성 ν›„ λ§€ ν”„λ ˆμž„λ§ˆλ‹€ ν˜ΈμΆœλ˜λŠ” μ΄λ²€νŠΈμ—μš”. μ—°κ²°ν•¨μˆ˜ ν˜•μ‹μ€ function(updateTime), updateTime 은 number μž…λ‹ˆλ‹€.

μ‚­μ œλ  λ•Œ ν˜ΈμΆœλ˜λŠ” μ΄λ²€νŠΈμ—μš”. μ—°κ²°ν•¨μˆ˜ ν˜•μ‹μ€ function() μž…λ‹ˆλ‹€.

Enable λ λ•Œ ν˜ΈμΆœλ˜λŠ” μ΄λ²€νŠΈμ—μš”. μ—°κ²°ν•¨μˆ˜ ν˜•μ‹μ€ function() μž…λ‹ˆλ‹€.

Disable λ λ•Œ ν˜ΈμΆœλ˜λŠ” μ΄λ²€νŠΈμ—μš”. μ—°κ²°ν•¨μˆ˜ ν˜•μ‹μ€ function() μž…λ‹ˆλ‹€.

ν•¨μˆ˜

이름

μ„€λͺ…

캐릭터 Material의 Emissive 값을 λ³€κ²½ ν•  수 μžˆμ–΄μš”. (자체 λ°œκ΄‘ν•˜λŠ” 수치 κ°’)

캐릭터에 물리적인 νž˜μ„ κ°€ν•  수 μžˆμ–΄μš”. (νž˜μ„ κ°€ν•  Vector κ°’)

μΊλ¦­ν„°μ˜ μ΅œλŒ€ 이동속도λ₯Ό 얻을 수 μžˆμ–΄μš”.

μΊλ¦­ν„°μ˜ μ΅œλŒ€ 점프속도λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  μ΅œλŒ€ 점프속도 κ°’)

μΊλ¦­ν„°μ˜ μ΅œλŒ€ 점프속도λ₯Ό 얻을 수 μžˆμ–΄μš”.

κ³΅μ€‘μ—μ„œ 캐릭터 컨트둀 λΉ„μœ¨μ„ μ„€μ •ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  λΉ„μœ¨ κ°’)

κ³΅μ€‘μ—μ„œ 캐릭터 컨트둀 λΉ„μœ¨μ„ 얻을 수 μžˆμ–΄μš”.

μΊλ¦­ν„°μ˜ μ΅œλŒ€ 곡쀑 이동속도λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. κΈ°μ–΄μ˜€λ₯΄κΈ°, λ‚ κΈ° λ“±μ˜ μƒνƒœμ—μ„œλ§Œ λ°˜μ˜λΌμš”. (μ„€μ •ν•  μ΅œλŒ€ 곡쀑 이동속도 κ°’)

μΊλ¦­ν„°μ˜ μ΅œλŒ€ 곡쀑 이동속도λ₯Ό 얻을 수 μžˆμ–΄μš”.

μΊλ¦­ν„°μ˜ 점프 κ°€λŠ₯ μ—¬λΆ€λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. (점프 κ°€λŠ₯ μ—¬λΆ€)

μΊλ¦­ν„°μ˜ 쒌우 이동 κ°€λŠ₯ μ—¬λΆ€λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. (쒌우 이동 κ°€λŠ₯ μ—¬λΆ€)

캐릭터λ₯Ό νŠΉμ • 슀폰 μœ„μΉ˜λ‘œ μ΄λ™μ‹œν‚¬ 수 μžˆμ–΄μš”. (이동 ν•  슀폰포인트 였브젝트, λ°©ν–₯ Rot μ΄ˆκΈ°ν™” μ—¬λΆ€)

ν˜„μž¬ μΊλ¦­ν„°μ˜ μ™Έν˜• νƒ€μž…μ„ λ°”κΏ€ 수 μžˆμ–΄μš”.

ν˜„μž¬ μΊλ¦­ν„°μ˜ 캑슐 μ½œλ¦¬μ „μ˜ 크기λ₯Ό λ°”κΏ€ 수 μžˆμ–΄μš”.

ν˜„μž¬ μΊλ¦­ν„°μ˜ μ™Έν˜• νƒ€μž…μ„ κ°€μ Έ 올 수 μžˆμ–΄μš”.

캐릭터에 νƒ€κ²Ÿ 였브젝트λ₯Ό 뢙일 수 μžˆμ–΄μš”. (νƒ€κ²Ÿ 였브젝트, 뢙일 AttachPoint)

캐릭터에 νƒ€κ²Ÿ 였브젝트λ₯Ό 뢙일 수 μžˆμ–΄μš”. (νƒ€κ²Ÿ 였브젝트, 뢙일 Bone)

캐릭터에 λΆ™μ–΄μžˆλŠ” 였브젝트λ₯Ό λ–¨μ–΄λœ¨λ¦΄ 수 μžˆμ–΄μš”. (νƒ€κ²Ÿ 였브젝트)

캐릭터에 λΆ™μ–΄μžˆλŠ” λͺ¨λ“  였브젝트λ₯Ό λ–¨μ–΄λœ¨λ €μš”.

객체의 ν‚€ 값을 얻을 수 μžˆμ–΄μš”.

ν˜„μž¬ λ§€νŠΈλ¦­μŠ€μ—μ„œ μ„€μ • 된 맀트릭슀둜 보간이 λ˜λŠ” 맀트릭슀λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš” μ„€μ •ν•  수 μžˆμ–΄μš”. (Matrix κ°’, bool 좩돌 처리 μ—¬λΆ€)

ν˜„μž¬ λ§€νŠΈλ¦­μŠ€μ—μ„œ μ„€μ • 된 맀트릭슀둜 보간이 λ˜λŠ” 맀트릭슀λ₯Ό λ‘œμ»¬μ’Œν‘œκΈ°μ€€μœΌλ‘œ μ„€μ •ν•  수 μžˆμ–΄μš” μ„€μ •ν•  수 μžˆμ–΄μš”. (Matrix κ°’, bool 좩돌 처리 μ—¬λΆ€)

μˆœκ°„μ΄λ™ ν•˜λŠ” 맀트릭슀λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. (Matrix κ°’)

객체의 μœ„μΉ˜λ₯Ό μ„€μ •ν•  수 μžˆμ–΄μš”. (μ„€μ •ν•  μœ„μΉ˜ Vector κ°’, 좩돌 처리 μ—¬λΆ€)

객체의 tagλ₯Ό μ„€μ •ν•΄μš”. (μ„€μ •ν•  tag)

객체에 μ„€μ •λœ tagλ₯Ό 얻을 수 μžˆμ–΄μš”.

μœ μ €κ°€ μΆ”κ°€ν•œ 였브젝트 μ»€μŠ€ν…€ μ΄λ²€νŠΈμ— ν•¨μˆ˜λ₯Ό μ—°κ²°ν•  수 μžˆμ–΄μš”. (이벀트 이름, μ—°κ²° ν•¨μˆ˜)

μ˜€λΈŒμ νŠΈκ°€ ν•΄λ‹Ήν•˜λŠ” μœ„μΉ˜λ₯Ό λ°”λΌλ³΄κ²Œ ν•  수 μžˆμ–΄μš”. (바라볼 μœ„μΉ˜ Vector)

PreviousMediaNextPhysics

Last updated 1 year ago

Was this helpful?

Visible
Transform
Location
Rotation
Enable
Transform
LocalTransform
Location
LocalLocation
Rotation
LocalRotation
Scale
Visible
OnUpdateEvent
OnDestroyEvent
OnEnableEvent
OnDisableEvent
SetEmissive
AddForce
GetMaxSpeed
SetMaxJump
GetMaxJump
SetFlyControl
GetFlyControl
SetFlyMaxSpeed
GetFlyMaxSpeed
JumpEnable
MoveRightEnable
MoveToSpawnPoint
ChangeCharacterType
SetCapsuleSize
GetCharacterType
AttachObject
AttachObject
DetachObject
DetachAllObject
GetKey
SetTransformWithCollisionCheck
SetLocalTransformWithCollisionCheck
Teleport
SetLocationWithCollisionCheck
SetTag
GetTag
ConnectEventFunction
LookAt