[source] | guide_examples [title] | 스프라이트 색상을 픽셀 단위로 설정하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=693 [code] | [client only] void SetAlphaTest() { local a = _UtilLogic:RandomDouble() -- SetAlpha를 사용하여 스프라이트 전체의 알파 값을 변경합니다. self.Entity.PixelRendererComponent:SetAlpha(a) }
[source] | guide_examples [title] | 어노테이션 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=824 [code] | ---@param param_name PARAM_TYPE
[source] | guide_examples [title] | 패킷 변조 대비하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1102 [code] | Method: [client only] void ClickGetRewardButton() { self:RewardProcess() } [server] void RewardProcess() { -- SendCoin() 함수를 호출하기 전, 반드시 올바른 요청이 맞는지 검증해야 합니다. self:SendCoin() } [server only] void SendCoin() { -- 실제 지급 로직 }
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local minDate = DateTime(2023, 03, 09, 20, 20, 0, 0) local maxDate = DateTime(2023, 03, 09, 22, 20, 0, 0) -- 값을 저장할 때 버전 값을 함께 지정한 경우에만 조회할 수 있습니다. local getResultCode, pages = ds:GetVersionsAndWait("Key", SortDirection.Ascending, minDate, m
[source] | examples [title] | PhysicsRigidbodyComponent [page] | apiReference/Components/PhysicsRigidbodyComponent [code] | Event Handler: [self] HandlePhysicsContactBeginEvent (PhysicsContactBeginEvent event) { --------------- Native Event Sender Info ---------------- -- Sender: PhysicsColliderComponent -- Space: Server, Client --------------------------------------------------------- -- Parameters local Contact
[source] | examples [title] | YoutubePlayerGUIComponent [page] | apiReference/Components/YoutubePlayerGUIComponent [code] | Property: [None] YoutubePlayerGUIComponent youtubePlayer = nil Method: [client only] void OnBeginPlay () { self.youtubePlayer = self.Entity.YoutubePlayerGUIComponent self.youtubePlayer.Urls = {"Http://WebUrl"} } Event Handler: [service: inputService] HandleKeyDownEvent (KeyDownEvent event) { --
[source] | guide_examples [title] | 실행 제어 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=210 [code] | void CallPlaySoundEffect() { if isClient == true then --PlaySoundEffect를 실행하라! elseif isServer == true then --클라이언트의 PlaySoundEffect를 실행하라! end }
[source] | guide_examples [title] | Data DB 저장 및 불러오기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=68 [code] | Property: [Sync] number Power = 0 Method: [server only] void OnBeginPlay() { local data = _DataStorageService:GetGlobalDataStorage("Data") local callBack = function(errorcode, key, value) if key == "Power" then self.Power = tonumber(value) end end
[source] | guide_examples [title] | TargetUserSync와 프로퍼티 동기화 최적화 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1119 [code] | Property: [Sync] integer meso = 0 Method: [server only] void IncreaseMeso() { self.meso += 1 }
[source] | examples [title] | EffectService [page] | apiReference/Services/EffectService [code] | Property: [None] number EffectSerial = 0 Event Handler: [service: InputService] HandleKeyDownEvent (KeyDownEvent event) { -- Parameters local key = event.key -------------------------------------------------------- if key == KeyboardKey.Space or key == KeyboardKey.LeftAlt then if not self.E
[source] | guide_examples [title] | TimeSpan으로 시간 표현하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=689 [code] | local timeSpan1 = TimeSpan(7, 45, 16) local timeSpan2 = TimeSpan(18, 12, 38) local timeSpanString1 = timeSpan1:ToFormattedString("G") local timeSpanString2 = timeSpan2:ToFormattedString("G") local timeSpanString3 = (timeSpan1 + timeSpan2):ToFormattedString("G", "fr-FR") log(timeSpanString1) -- 0:0
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | [client only] void OnBeginPlay() { _OverlayLightService:SetOverlayLightEnabled(true) -- 생성할 Freeform 타입 광원의 정보를 담을 객체를 생성합니다. local overlayLightInfo = FreeformTypeOverlayLightInfo(self.Entity) -- 광원 모양을 만들 점의 정보들을 입력합니다. local freeformPoints = table.create(4) freefo
[source] | examples [title] | TweenCircularComponent [page] | apiReference/Components/TweenCircularComponent [code] | local tween =self.Entity.TweenCircularComponent tween.Degree = 0 -- 회전 반경을 2로 설정합니다. tween.Radius = 2 -- 1초에 180도만큼의 속력으로 회전합니다. 한 바퀴 회전하는 데 2초가 소요됩니다. tween.Speed = 180
[source] | guide_examples [title] | 카드와 UI 만들기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=561 [code] | Property: [None] Entity CardPairGameUI = /ui/CardPairGameUI Method: [client only] void StartGame() { self.CardPairGameUI.Enable = true } [client only] void OnBeginPlay() { self:StartGame() }
[source] | guide_examples [title] | 오버레이 라이트 제어하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1346 [code] | _OverlayLightService:SetOverlayLightEnabled(true)
[source] | guide_examples [title] | 엔티티를 탐색하는 EntityService [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=201 [code] | void GetEntityByTagExample() { local entity = _EntityService:GetEntityByTag("FlayingMonster") log(entity.Name) }
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfos = {} local keyInfo1 = DataStorageKeyInfo("Key1", "Version1", "Tag1") local keyInfo2 = DataStorageKeyInfo("Key2", "Version2", "Tag2") table.insert(keyInfos, keyInfo1) table.insert(keyInfos, keyInfo2) local getResultCode, pages
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local getResultCode, pages = ds:GetPagesAndWait("Tag") if getResultCode ~= 0 then error("Failed to GetPagesAndWait. Error : " + tostring(getResultCode)) return end while true do -- 현재 페이지의 목록을 가져옵니다. local datas = pages:GetCu
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 8, 29, 19, 7, 15, 023) log(date:ToFormattedString("MM")) -- 08
[source] | guide_examples [title] | 커스텀 PlayerController 만들기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1403 [code] | Method: [client only] string GetActionName(any key) { local actionName = self.ActionKeys[key] if actionName == nil then return "" end return actionName } [client only] void SetActionKey(any key, string actionName) { if not self.IsValid then return end
[source] | guide_examples [title] | 정규식 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1041 [code] | local origin = "letter alphabetical missing lack release penchant slack acryllic laundry cease" local pattern = "\\w+ " local regex = Regex(pattern, RegexOption.IgnorePatternWhitespace) ---@param match RegexMatch ---@return string local function evaluator(match) return match.Text.."("..to
[source] | examples [title] | DataStorageItemPages [page] | apiReference/Misc/DataStorageItemPages [code] | while true do -- 현재 페이지의 목록을 가져옵니다. local datas = pages:GetCurrentPageDatas() for _, data in pairs(datas) do -- DataStorageItem을 통해 키, 버전, 태그, 값을 조회할 수 있습니다. log(data.KeyInfo.Key) log(data.KeyInfo.Tag) log(data.KeyInfo.Version) log(data.Value) end -- 현재 페이지가 마지막 페이지인지 확인합니다. i
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 8, 29, 19, 7, 5, 023) log(date:ToFormattedString("yyyy")) -- 2022
[source] | guide_examples [title] | InputService를 활용한 입력과 액션 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=209 [code] | [service: InputService] HandleKeyUpEvent(KeyUpEvent event) { --------------- Native Event Sender Info ---------------- -- Sender: InputService -- Space: Client --------------------------------------------------------- -- Parameters local key = event.key -------------
[source] | guide_examples [title] | 월드 인스턴스 통신 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=999 [code] | -- 공유 변수 var1의 참조를 해제합니다. local releaseVarResult = mem:ReleaseVariableAndWait("var1") -- WorldInstanceSharedMemory 내 모든 공유 변수의 참조를 해제합니다. local releaseMemResultCode = _WorldInstanceService:ReleaseSharedMemoryAndWait("MemoryName")
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keys = {} table.insert(keys, "Key1") table.insert(keys, "Key2") local errorCode, deletedKeys = ds:BatchDeleteAndWait(keys) if errorCode ~= 0 then error("Failed to BatchDeleteAndWait. Error : " + tostring(errorCode)) return en
[source] | guide_examples [title] | Effective MSW 1 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=559 [code] | local targetEntity = _EntityService:GetEntity("a22396e1-6365-42d4-9cef-5924c223f7fa") if targetEntity ~= nil then -- Do Something end
[source] | guide_examples [title] | 엔티티와 컴포넌트 참조 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=164 [code] | void OnBeginPlay() { local myEntity = self.Entity log(myEntity.Name) -- Entity C의 이름 출력 local parentEntity = myEntity.Parent log(parentEntity.Name) -- Entity A의 이름 출력 local children = parentEntity.Children --Entity A의 하위 엔티티를 테이블 형태로 받아 옴 local childrenEntit
[source] | guide_examples [title] | 엔티티와 컴포넌트 참조 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=164 [code] | void OnBeginPlay() { local myEntity = self.Entity log(myEntity.Name) -- 엔티티 이름 출력 }
[source] | guide_examples [title] | 메이플스토리 월드 루아 구문 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=944 [code] | local testdictionary = {name = "Tom", age = 20, favoriteGame = "MapleStory Worlds", job = "Programmer"} for key, value in pairs(testdictionary) do print(key, value) end --[[결과: favoriteGame MapleStory Worlds name Tom job Programmer age 20 ]]