: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
  • μ§€μ—­ λ³€μˆ˜
  • ν•¨μˆ˜ μ•ˆμ—μ„œ μ„ μ–Έν•˜λŠ” μ§€μ—­ λ³€μˆ˜
  • μ „μ—­ λ³€μˆ˜
  • ν•¨μˆ˜
  • λͺ¨λ“ˆ
  • μ½”λ”© μŠ€νƒ€μΌ
  • λ³€μˆ˜
  • ν•¨μˆ˜
  • ν•¨μˆ˜μ˜ 인자
  • μ€„λ°”κΏˆ
  • μ—°μ‚°
  • 쑰건문
  • 반볡문

Was this helpful?

Coding Style

μ§€μ—­ λ³€μˆ˜

local둜 μ„ μ–Έν•œ λ³€μˆ˜λ₯Ό μ§€μ—­ λ³€μˆ˜λΌκ³  ν•΄μš”.

λ³€μˆ˜ 이름은 첫 κΈ€μžλŠ” λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•˜κ³  μ—°κ²°λ˜λŠ” λ‹¨μ–΄λŠ” λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•΄μš”.

local WorldString = "Hello world!"

ν•¨μˆ˜ μ•ˆμ—μ„œ μ„ μ–Έν•˜λŠ” μ§€μ—­ λ³€μˆ˜

ν•¨μˆ˜μ•ˆμ—μ„œ λ³€μˆ˜λ₯Ό local둜 μ„ μ–Έν• λ•ŒλŠ”

첫 κΈ€μžλŠ” μ†Œλ¬Έμžλ‘œ μ‹œμž‘ν•˜κ³  μ—°κ²°λ˜λŠ” λ‹¨μ–΄λŠ” λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•΄μš”.

local function SomeFunc()
    local worldString = "Hello world!"
end

μ „μ—­ λ³€μˆ˜

λ³€μˆ˜ 이름은 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•˜κ³  μ—°κ²°λ˜λŠ” 단어도 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•΄μš”.

TestWorld = 1

ν•¨μˆ˜

ν•¨μˆ˜ 이름은 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•˜κ³  μ—°κ²°λ˜λŠ” 단어도 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•΄μš”.

local function WorldStart()
   print("Hello World!")
end
WorldStart()

λͺ¨λ“ˆ

λ‹€λ₯Έ μŠ€ν¬λ¦½νŠΈμ—μ„œ require둜 μ ‘κ·Όν•΄μ„œ μ‚¬μš©ν•  수 μžˆλ„λ‘ μ œκ³΅ν•˜λŠ” 슀크립트λ₯Ό λͺ¨λ“ˆμ΄λΌκ³  ν•΄μš”.

λͺ¨λ“ˆ 이름은 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•˜κ³  μ—°κ²°λ˜λŠ” 단어도 λŒ€λ¬Έμžλ‘œ μ‹œμž‘ν•΄μš”.

local TestModules = {}
    ...
return TestModules

μ½”λ”© μŠ€νƒ€μΌ

λ³€μˆ˜

였브젝트의 λ³€μˆ˜λŠ” λ‹€μŒκ³Ό 같이 "."으둜 ν‘œμ‹œν•΄μš”.

Object.Start = 10

ν•¨μˆ˜

였브젝트의 ν•¨μˆ˜λŠ” λ‹€μŒκ³Ό 같이 ":"으둜 ν‘œμ‹œν•΄μš”.

Object:StartFunction()

ν•¨μˆ˜μ˜ 인자

ν•¨μˆ˜μ˜ 인자 값은 λ‹€μŒκ³Ό 같이 λ„μ–΄μ“°κΈ°ν•©λ‹ˆλ‹€.

-- 잘된 예
Object:StartFunction(1, 3, "Test")
-- 잘λͺ»λœ 예
Object:StartFunction(1,3,"Test")

μ€„λ°”κΏˆ

쀄 λ°”κΏˆμ€ λ‹€μŒκ³Ό 같이 ν•΄μš”.

-- 잘된 예
local Color =
{
    blue = 1,
    red  = 2 
}
-- 잘λͺ»λœ 예
local Color = {
    blue = 1,
    red  = 2 
}

μ—°μ‚°

연산은 띄어쓰기λ₯Ό λ‹€μŒκ³Ό 같이 ν•΄μš”.

-- 잘된 예
local Result = 10 + 20 * 3 ^ 2
-- 잘λͺ»λœ 예
local Result = 10+ 20 *3^2

쑰건문

쑰건문의 λ„μ–΄μ“°κΈ°λŠ” λ‹€μŒκ³Ό 같이 ν•΄μš”.

-- 잘된 예
if object ~= nil and value == 3 then
    ...
end
-- 잘λͺ»λœ 예
if object~=nil and value ==3 then
    ...
end

반볡문

쑰건문의 λ„μ–΄μ“°κΈ°λŠ” λ‹€μŒκ³Ό 같이 ν•΄μš”.

-- 잘된 예
for i = 1, 5, 1 do
    ...
end
-- 잘λͺ»λœ 예
for i = 1,5,1 do
    ...
end
PreviousExternal AvatarNextAPI Reference

Last updated 2 years ago

Was this helpful?