Suporte ao desenvolvimento de jogos!


    Aura / Paperdoll

    Compartilhe
    avatar
    driko
    Semi-Experiente
    Semi-Experiente

    Mensagens : 122
    Créditos : 7

    Ficha do personagem
    Nível: 1
    Vida:
    30/30  (30/30)
    Energia:
    0/0  (0/0)

    Aura / Paperdoll

    Mensagem por driko em Sex Abr 20, 2018 4:49 am

    Tava procurando um tutorial sobre paperdoll mas não achei, tentei ripar da skywyre mas me falta experiência, tem um sistema de "Aura" na Resbak que eu creio que seja o paperdoll, mas está modificado ele só conta 3 frames... Seria difícil alterar isso?



    Creio que seja algo por aqui:
    Código:
    If GetPlayerEquipment(Index, Helmet) Then
            If Item(GetPlayerEquipment(Index, Helmet)).Paperdoll > 0 Then
                If Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width > Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height Then
                    Select Case GetPlayerDir(Index)
                        Case DIR_UP
                            RenderTexture Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll), ConvertMapX((X + ((Tex_Character(Sprite).width / 3) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 8)), ConvertMapY((y + ((Tex_Character(Sprite).height / 4) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height / 2)), 0, 0, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, D3DColorARGB(255 - Item(GetPlayerEquipment(Index, Helmet)).a, 255 - Item(GetPlayerEquipment(Index, Helmet)).R, 255 - Item(GetPlayerEquipment(Index, Helmet)).G, 255 - Item(GetPlayerEquipment(Index, Helmet)).B)
                        Case DIR_LEFT
                            RenderTexture Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll), ConvertMapX((X + ((Tex_Character(Sprite).width / 3) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 8)), ConvertMapY((y + ((Tex_Character(Sprite).height / 4) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height / 2)), 2 * (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3), 0, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, D3DColorARGB(255 - Item(GetPlayerEquipment(Index, Helmet)).a, 255 - Item(GetPlayerEquipment(Index, Helmet)).R, 255 - Item(GetPlayerEquipment(Index, Helmet)).G, 255 - Item(GetPlayerEquipment(Index, Helmet)).B)
                            ' render the actual sprite
                            If GetTickCount > TempPlayer(Index).StartFlash Then
                                Call DrawSprite(Sprite, X, y, Rec)
                                TempPlayer(Index).StartFlash = 0
                            Else
                                Call DrawSprite(Sprite, X, y, Rec, , , , , True)
                            End If
                        Case DIR_RIGHT
                            RenderTexture Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll), ConvertMapX((X + ((Tex_Character(Sprite).width / 3) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 8)), ConvertMapY((y + ((Tex_Character(Sprite).height / 4) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height / 2)), Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, 0, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, D3DColorARGB(255 - Item(GetPlayerEquipment(Index, Helmet)).a, 255 - Item(GetPlayerEquipment(Index, Helmet)).R, 255 - Item(GetPlayerEquipment(Index, Helmet)).G, 255 - Item(GetPlayerEquipment(Index, Helmet)).B)
                            ' render the actual sprite
                            If GetTickCount > TempPlayer(Index).StartFlash Then
                                Call DrawSprite(Sprite, X, y, Rec)
                                TempPlayer(Index).StartFlash = 0
                            Else
                                Call DrawSprite(Sprite, X, y, Rec, , , , , True)
                            End If
                        Case DIR_DOWN
                            RenderTexture Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll), ConvertMapX((X + ((Tex_Character(Sprite).width / 3) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 8)), ConvertMapY((y + ((Tex_Character(Sprite).height / 4) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height / 2)), 0, 0, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 3, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, D3DColorARGB(255 - Item(GetPlayerEquipment(Index, Helmet)).a, 255 - Item(GetPlayerEquipment(Index, Helmet)).R, 255 - Item(GetPlayerEquipment(Index, Helmet)).G, 255 - Item(GetPlayerEquipment(Index, Helmet)).B)
                            ' render the actual sprite
                            If GetTickCount > TempPlayer(Index).StartFlash Then
                                Call DrawSprite(Sprite, X, y, Rec)
                                TempPlayer(Index).StartFlash = 0
                            Else
                                Call DrawSprite(Sprite, X, y, Rec, , , , , True)
                            End If
                    End Select
                Else
                    RenderTexture Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll), ConvertMapX((X + ((Tex_Character(Sprite).width / 3) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width / 2)), ConvertMapY((y + ((Tex_Character(Sprite).height / 4) / 2)) - (Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height / 2)), 0, 0, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).width, Tex_Aura(Item(GetPlayerEquipment(Index, Helmet)).Paperdoll).height, D3DColorARGB(255 - Item(GetPlayerEquipment(Index, Helmet)).a, 255 - Item(GetPlayerEquipment(Index, Helmet)).R, 255 - Item(GetPlayerEquipment(Index, Helmet)).G, 255 - Item(GetPlayerEquipment(Index, Helmet)).B)
                    ' render the actual sprite
                    If GetTickCount > TempPlayer(Index).StartFlash Then
                        Call DrawSprite(Sprite, X, y, Rec)
                        TempPlayer(Index).StartFlash = 0
                    Else
                        Call DrawSprite(Sprite, X, y, Rec, , , , , True)
                    End If
                End If
            End If
        End If

    Ou aqui:
    Código:
    Public Sub DrawPaperdoll(ByVal X2 As Long, ByVal Y2 As Long, ByVal Sprite As Long, ByVal Anim As Long, ByVal spritetop As Long, ByVal Colour As Long)
    Dim Rec As RECT
    Dim X As Long, y As Long
    Dim width As Long, height As Long
        
        ' If debug mode, handle error then exit out
        If Options.Debug = 1 Then On Error GoTo ErrorHandler

        If Sprite < 1 Or Sprite > NumPaperdolls Then Exit Sub
        
        With Rec
            .Top = spritetop * (Tex_Paperdoll(Sprite).height / 4)
            .Bottom = .Top + (Tex_Paperdoll(Sprite).height / 4)
            .Left = Anim * (Tex_Paperdoll(Sprite).width / 3)
            .Right = .Left + (Tex_Paperdoll(Sprite).width / 3)
        End With

    Ou nenhum desses ;-;
    avatar
    Profane ~
    Administrador
    Administrador

    Mensagens : 731
    Créditos : 126

    Re: Aura / Paperdoll

    Mensagem por Profane ~ em Sex Abr 20, 2018 7:58 am

    Esse sistema ta mais pra Sistema de Burrice.


    Oiin!

    Bem, pelo que notei a Draw analisa a direção do player e modifica a ordem de draw baseando-se nisso.

    Logo é 3 frames por ele apenas alterar a Frame 0 (Asas Completas), em posicionamento.
    ex:
    Assim 
       [UP]              [DOWN]
    Player             Asa
      ASA               Player

    Dessa forma tenta dar a ideia que foi invertido e economiza 1 frame na img  Confuse

    UASHUHSA, mas qq cê quer? acho que no post não fica claro.


    _________________
    "If you don't belong here, just build a place where you do."
    avatar
    driko
    Semi-Experiente
    Semi-Experiente

    Mensagens : 122
    Créditos : 7

    Ficha do personagem
    Nível: 1
    Vida:
    30/30  (30/30)
    Energia:
    0/0  (0/0)

    Re: Aura / Paperdoll

    Mensagem por driko em Sex Abr 20, 2018 8:51 am

    Malz ;s aoksas
    Então, eu quero o sistema de paperdoll como o que tem na skywyre. 


    Conteúdo patrocinado

    Re: Aura / Paperdoll

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Ter Dez 11, 2018 4:05 pm