[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | ---@sealed
[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | ---@sealed property any NewValue = nil
[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | ---@description "Test"
[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | ---@description "Test Value" property any NewValue = nil
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | -- Vector3을 사용할 때 local newPosition = Vector3(0, 0, 0) newPosition.x = 1 newPosition.y = 2 self.Entity.TransformComponent.Position = newPosition
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local newPositionFast = FastVector3(0, 0, 0) newPositionFast.x = 1 newPositionFast.y = 2 self.Entity.TransformComponent.Position = newPositionFast
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local vt = FastVector3.zero:Clone() vt.x = 1
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local vt = FastVector3.zero vt.x = 1 -- FastVector3.zero : FastVector(1,0,0)
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local vt = Vector3.zero vt.x = 1 -- Vector3.zero : Vector(0,0,0)
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | ---@type FastVector3 property any vt = FastVector3(0,0,0) ---@param vt FastVector3 method void NewMethod(any vt) -- ... end
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | -- static 프로퍼티 추가 FastVector3.two = FastVector3(2, 2, 2) -- 함수 추가 local v3mt = getmetatable(FastVector3.zero) v3mt.NewFunction = function(self) -- ... end
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | -- Position 값을 읽어올 때 참조 객체가 생성됨 local position = self.Entity.TransformComponent.Position -- Vector3 객체를 생성할 때 참조 객체가 생성됨 local vt = Vector3(0, 0, 0)
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | -- 참조 객체가 생성됨 local newPosition = Vector3(0, 0, 0) -- 참조 객체가 생성되지 않음 newPosition.x = 1 newPosition.y = 2 self.Entity.TransformComponent.Position = newPosition
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | -- 참조 객체가 생성되지 않음 local newPositionFast = FastVector3(0, 0, 0) -- 참조 객체가 생성되지 않음 newPositionFast.x = 1 newPositionFast.y = 2 -- 네이티브 프로퍼티에 FastVector3을 대입할 때는 참조 객체가 생성되지 않음 self.Entity.TransformComponent.Position = newPositionFast
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local transform = self.Entity.TransformComponent -- 평균 1.113 us local position1 = transform:PositionAsFastVector3() -- 참조 객체가 생성되지 않음 position1.x += 0.1 position1.y += 0.1 transform.Position = position1 -- 평균 2.217 us local position2 = transform.Position -- 참조 객체가 생성됨 position2.x += 0.1 po
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | Property: Vector3 vt3 = Vector3(0, 0, 0) Method: void Test() { -- FastVector3가 Vector3으로 자동 변환 self.vt3 = FastVector3(1, 1, 1) -- 로컬 변수가 Vector3를 참조하면서 참조 객체가 생성 local vt = self.vt3 }
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local v = FastVector3(1, 2, 3) print(v.x, v.y, v.z) -- Output: 1 2 3 print (v[1], v[2], v[3]) -- Output: 1 2 3
[source] | guide_examples [title] | FastVector3을 활용한 월드 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1300 [code] | local v3mt = getmetatable(FastVector3.zero) -- FastVector3의 Normalize 함수를 수정 v3mt.Normalize = function(self) local x, y, z = self[1], self[2], self[3] -- self.x , self.y , self.z local length = (x*x + y*y + z*z) ^ 0.5 if length == 0 then return FastVector3(x, y, z) end
[source] | guide_examples [title] | 동적으로 맵 생성, 파괴하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1322 [code] | Property: [None] string PortalEntityPath = "nil" Method: void OnBeginPlay() { local fullPath = self.Entity.CurrentMap.Path .. "/" .. self.PortalEntityPath local targetEntity = _EntityService:GetEntityByPath(fullPath) if targetEntity == nil or targetEntity.PortalComponent == nil then log_w
[source] | guide_examples [title] | Skeleton 리소스 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1343 [code] | local skel = self.Entity.SkeletonRendererComponent local walk = SkeletonAnimationClip() walk.TrackIndex = 2 walk.AnimationName = "walk" skel:AddAnimation(walk) local shoot = SkeletonAnimationClip() shoot.TrackIndex = 3 shoot.AnimationName = "shoot" skel:AddAnimation(shoot)
[source] | guide_examples [title] | Skeleton 리소스 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1343 [code] | local skel = self.Entity.SkeletonRendererComponent local shootEnd = SkeletonAnimationClip() shootEnd.TrackIndex = 3 shootEnd.MixDuration = 0.5 skel:SetEmptyAnimation(shootEnd)
[source] | guide_examples [title] | Skeleton 리소스 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1343 [code] | local skel = self.Entity.SkeletonRendererComponent skel:ClearTrack(3)
[source] | guide_examples [title] | Skeleton 리소스 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1343 [code] | local skel = self.Entity.SkeletonRendererComponent skel:SetAttachment("face", "goggle")
[source] | guide_examples [title] | Skeleton 리소스 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1343 [code] | local skel = self.Entity.SkeletonRendererComponent skel:SetAttachment("face", nil)
[source] | guide_examples [title] | 화면 전환 효과 재생하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1345 [code] | Event Handler: [service: InputService] HandleKeyDownEvent(KeyDownEvent event) { --------------- Native Event Sender Info ---------------- -- Sender: InputService -- Space: Client --------------------------------------------------------- -- Parameters local key = event.ke
[source] | guide_examples [title] | 화면 전환 효과 재생하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1345 [code] | _ScreenTransitionService:DissolveScreen(3, true, true)
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | _OverlayLightService:SetOverlayLightEnabled(true)
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | Method: [client only] void OnBeginPlay() { -- Overlay Light를 활성화합니다. _OverlayLightService:SetOverlayLightEnabled(true) local lightEntity = _SpawnService:SpawnByModelId("model://New_Model", "Light", Vector3.zero, self.Entity) -- 엔티티에 OverlayLightComponent를 추가합니다. local o
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | [client only] void OnBeginPlay() { _OverlayLightService:SetOverlayLightEnabled(true) local lightEntity = _SpawnService:SpawnByModelId("model://New_Model", "Light", Vector3.zero, self.Entity) ---@type OverlayLightComponent local overlayLightComponent = lightEntity:AddCompone
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | wait(10) lightEntity:RemoveComponent(OverlayLightComponent)