Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker

Estamos de volta o/ ... Ou não.Eu amo a -Dark
Doações para o fórum abertas, clique aqui e saiba mais.
Últimos assuntos
» Ainda temos gente aqui?
Trabalhando com auto-ataque EmptyQui 25 Nov 2021, 14:04 por Halt

» [Dúvida] Como tirar a porcentagem de esquiva
Trabalhando com auto-ataque EmptySex 19 Nov 2021, 17:14 por Halt

» Pokémon Genesis Online! (PGO)
Trabalhando com auto-ataque EmptyQua 05 Jul 2017, 18:08 por Lexar

» Tileset Converter to MV
Trabalhando com auto-ataque EmptySex 12 maio 2017, 14:07 por Douggi

» Pack Resources, Sprites e etc
Trabalhando com auto-ataque EmptyQua 23 Dez 2015, 12:30 por raydengv

» Download RPG Maker 2003 + RTP em português
Trabalhando com auto-ataque EmptyTer 22 Dez 2015, 11:14 por ::KimMax::

» Fantasy Art Online
Trabalhando com auto-ataque EmptyDom 18 Out 2015, 18:42 por daviih123

» Você vai ter medo do Nerve gear?
Trabalhando com auto-ataque EmptySáb 25 Jul 2015, 17:02 por Kirito-kun

» O Barato é louco
Trabalhando com auto-ataque EmptySáb 27 Jun 2015, 16:26 por Halt

» Download RPG Maker 2000 + RTP em português
Trabalhando com auto-ataque EmptyQui 21 maio 2015, 20:28 por Wismael


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1Trabalhando com auto-ataque Empty Trabalhando com auto-ataque Qui 10 Jan 2013, 14:19

Halt

Halt
Administrador
Administrador
Valentine escreveu:Valentine
Eu vi este tutorial postado originalmente no touchofdeath, ele tinha alguns bugs, estava incompleto e só funcionava com npcs, então eu o completei.

Deathbeam
Este tutorial vai fazer o seguinte: Se você tem alvo e está de frente para o mesmo, o jogador irá atacá-lo automaticamente até matar.

LADO CLIENTE

Em frmMain, na picOptions criar
Checkbox
Name: chkAutoAttack
Caption: Auto Ataque

Então, em modGameLogic encontre isto:
Código:
Dim tmr10000 As Long

Embaixo adicione:
Código:
Dim x As Long, y As Long

Agora procure por:
Código:
            If CanMoveNow Then
                Call CheckMovement ' Check if player is trying to move
                Call CheckAttack  ' Check to see if player is trying to attack
            End If

Substitua por isto:
Código:
            If frmMain.chkAutoAttack.Value = YES Then
                If CanMoveNow Then
                    Select Case Player(MyIndex).Dir
                        Case DIR_UP
                            X = GetPlayerX(MyIndex)
                            y = GetPlayerY(MyIndex) - 1
                        Case DIR_DOWN
                            X = GetPlayerX(MyIndex)
                            y = GetPlayerY(MyIndex) + 1
                        Case DIR_LEFT
                            X = GetPlayerX(MyIndex) - 1
                            y = GetPlayerY(MyIndex)
                        Case DIR_RIGHT
                            X = GetPlayerX(MyIndex) + 1
                            y = GetPlayerY(MyIndex)
                    End Select
                    If myTargetType = TARGET_TYPE_NPC Then
                        If X = MapNpc(myTarget).X And y = MapNpc(myTarget).y Then ControlDown = True
                    ElseIf myTargetType = TARGET_TYPE_PLAYER Then
                        If X = Player(myTarget).X And y = Player(myTarget).y Then ControlDown = True
                    End If
                    Call CheckMovement ' Check if player is trying to move
                    Call CheckAttack  ' Check to see if player is trying to attack
                End If
            Else
                If CanMoveNow Then
                    Call CheckMovement ' Check if player is trying to move
                    Call CheckAttack  ' Check to see if player is trying to attack
                End If
            End If

Créditos:
Deathbeam (Por ser o criador original do tutorial)
Valentine (Por corrigir alguns erros do tutorial, traduzir e postar aqui)

https://arenarpgmaker.forumeiros.com

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos