Karakter Seçimi, Giriş ve Oluşturma Kamera Animasyonu

Aethre

www.pvpers.gg
Katılım
19 Haz 2024
Konular
366
Mesajlar
455
Beğeniler
732
GG Coin
13,218
Ticaret Değeri - 0%
0   0   0
Discord
pvpers.gg


1739960127928.png


1739960139862.png


Gizlenmiş içeriği görüntüleyebilmek için Giriş Yap ya da Kayıt Ol
Bu işlem, 15 saniyeden az sürer.


Fix1
LoadMap fonksiyonunu şu şekilde değiştirin;
Kod:
    def LoadMap(self):
        id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
        if 0 == id:
            GetObject=self.dlgBoard.GetChild
            self.backGroundImg1 = GetObject("BackGround")
            self.backGroundImg1.Show()
        else:
            background.Initialize()
            MAPS_LIST = [
                {"x": 30000, "y": 40000, "map_name": "metin2_map_a1"},
                {"x": 12300, "y": 32100, "map_name": "metin2_map_n_desert_01"},
                {"x": 78300, "y": 84400, "map_name": "map_a2"},
                {"x": 78000, "y": 62000, "map_name": "map_n_snowm_01"},
                {"x": 80400, "y": 19200, "map_name": "metin2_map_b1"},
                {"x": 35800, "y": 54400, "map_name": "metin2_map_c1"},
            ]
            map_random = MAPS_LIST[app.GetRandom(0,len(MAPS_LIST)-1)]
            background.LoadMap(map_random["map_name"], map_random["x"], map_random["y"], 0)
            background.SetShadowLevel(background.SHADOW_ALL)
            chr.SelectInstance(self.slot)
            player.SetMainCharacterIndex(self.slot)
            chr.SetPixelPosition(map_random["x"], map_random["y"])
            self.backGroundImg1.Hide()

Fix2
CharacterRenderer sınıfı içerisinde def OnRender arat ve altına geçip self.Refresh() yerleştir.
Kod:
    class CharacterRenderer(ui.Window):
        def OnRender(self):
            #Added part
            self.Refresh()
            #Added part
            grp.ClearDepthBuffer()
            grp.SetGameRenderState()
            grp.PushState()
            grp.SetOmniLight()

            screenWidth = wndMgr.GetScreenWidth()
            screenHeight = wndMgr.GetScreenHeight()
            newScreenWidth = float(screenWidth - 270)
            newScreenHeight = float(screenHeight)

            grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)

            app.SetCenterPosition(0.0, 0.0, 0.0)
            app.SetCamera(1550.0, 15.0, 180.0, 95.0)
            grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0)

            (x, y) = app.GetCursorPosition()
            grp.SetCursorPosition(x, y)

            chr.Deform()
            chr.Render()

            grp.RestoreViewport()
            grp.PopState()
            grp.SetInterfaceRenderState()
 
paylaşım için teşekkürler ben nostaljiden yanayım ama güzel duruyor
 


Ekli dosyayı görüntüle 450

Ekli dosyayı görüntüle 451

<b>[Gizli içerik]</b>

Fix1
LoadMap fonksiyonunu şu şekilde değiştirin;
Kod:
    def LoadMap(self):
        id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
        if 0 == id:
            GetObject=self.dlgBoard.GetChild
            self.backGroundImg1 = GetObject("BackGround")
            self.backGroundImg1.Show()
        else:
            background.Initialize()
            MAPS_LIST = [
                {"x": 30000, "y": 40000, "map_name": "metin2_map_a1"},
                {"x": 12300, "y": 32100, "map_name": "metin2_map_n_desert_01"},
                {"x": 78300, "y": 84400, "map_name": "map_a2"},
                {"x": 78000, "y": 62000, "map_name": "map_n_snowm_01"},
                {"x": 80400, "y": 19200, "map_name": "metin2_map_b1"},
                {"x": 35800, "y": 54400, "map_name": "metin2_map_c1"},
            ]
            map_random = MAPS_LIST[app.GetRandom(0,len(MAPS_LIST)-1)]
            background.LoadMap(map_random["map_name"], map_random["x"], map_random["y"], 0)
            background.SetShadowLevel(background.SHADOW_ALL)
            chr.SelectInstance(self.slot)
            player.SetMainCharacterIndex(self.slot)
            chr.SetPixelPosition(map_random["x"], map_random["y"])
            self.backGroundImg1.Hide()

Fix2
CharacterRenderer sınıfı içerisinde def OnRender arat ve altına geçip self.Refresh() yerleştir.
Kod:
    class CharacterRenderer(ui.Window):
        def OnRender(self):
            #Added part
            self.Refresh()
            #Added part
            grp.ClearDepthBuffer()
            grp.SetGameRenderState()
            grp.PushState()
            grp.SetOmniLight()

            screenWidth = wndMgr.GetScreenWidth()
            screenHeight = wndMgr.GetScreenHeight()
            newScreenWidth = float(screenWidth - 270)
            newScreenHeight = float(screenHeight)

            grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)

            app.SetCenterPosition(0.0, 0.0, 0.0)
            app.SetCamera(1550.0, 15.0, 180.0, 95.0)
            grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0)

            (x, y) = app.GetCursorPosition()
            grp.SetCursorPosition(x, y)

            chr.Deform()
            chr.Render()

            grp.RestoreViewport()
            grp.PopState()
            grp.SetInterfaceRenderState()

Yanıt verdik hocam eline sağlık
 
Geri
Üst Alt