Popular Post

Postado por : Unknown sábado, 12 de janeiro de 2013

Tutorial de Seleção de Hero por Dialog Box
By:Terro



Bom galera, eu aqui com mais u tutorial, desta vez com Seleção de Hero por Dialogo.


1º Etapa: crie uma região ( será o lugar onde o Hero Selecionado irá nascer ), 




Depois disso Vamos a trigger.

Cria as Variaveis:

Dialog_Box - Dialog
Dialog_Button - Dialog Button Array [1]
Dialog_Heros - Unit-Type Array [1]
Dialog_Numeros - Interger Array [1]
Dialog_Numeros_Random - Interger

Cria um evento para que a caixa de dialogo aparece segundos depois do jogo começar, depois crie uma Action de dialog - dialog clear - Dialog_Box, depois disso criará um nome para a caixa de dialogo, Dialog - Change Title - Dialog_Box to ( aqui será o nome da caixa de dialogo ).
Depois disso crie os botões para cada Hero que você queira, nesta de exemplo usarei 3 Hero mais o Random, Action - Dialog - Create Dialog Button - Create Dialog Button for Dialog_Box labelled Paladin ( coloque o nome do Hero que você escolherá no Dialogo ), depois disso Crie um variavel, Set Dialog_Button [1] = (Last Created dialog Button), Criei mais 3 desses botões para Mage, Blood Mage e o Random.Depois a proxima Action Determina em que Player vai aparecer a Caixa de dialogo, Dialog - Dialog - Show/Hide - Show Dialog_Box for (Aqui você coloca o player do seu gosto, o meu será player 1 o red ) Player 1 (Red)

Veja a Seguir:


2º Etapa Botões:

Para fazer com que crie o Hero que selecionou na Caixa de Dialogo, Crie uma nova Trigger, depois procure em Event - Dialog - Dialog Click Button - A dialog button is clicked for Dialog_Box, em Conditions vá em Dialog - Dialog Comparison - (Clicked dialog Button ) Equal to Dialog_Button [1] ( esse botão se refere ao paladin, se o Players clicar no botão do paladin, aparece ele se conseguir fazer esta trigger ), a Action é simples, Unit - Create Units Facing Angel - Create ( aqui você escolhe o Hero que selecionou como o botão número 1, que no meu caso escolhi o Paladin) Paladin for Players 1 (Red) at (( Aqui você colocara a região que criou antes)Center of Region - Center of ( A região onde você criou para o Hero nascer ) facing default facing degress, depois faça com que a Caixa de Dialogo Suma, Dialog - Show/ Hide - Hide Dialog_Box for Player 1 (Red). Faça essa mesma Trigger de cria o Hero com os Heros que selecionou para serem criado na Caixa de Dialogo, assim como eu fiz com o Mage e o Blood Mage:



3º Etapa: {Random} Essa parte do random é sempre problematica, simplismente o Random não funciona quando é testado no World Editor, para testa-lo você precisa coloca-lo na pasta de Mapas do Warcraft e testa-los jogando na Net Work, assim não averá Bug e o Número de Random não se repitará varias vezes consecutivas.

Primeiro, usaremos as variaveis de Dialog_Heros, Dialog_Numero e Dialog_Random_Numero.
Dialog_Heros é de Type Unit, então é para escolher o Hero que sairá na Random, no meu caso, que já disse, Escolhi Mage, Paladin e Blood Mage, Escolhi a seguinte Variavel:

Dialog_Heros [1] = Paladin
Dialog_Heros [2] = Mage
Dialog_Heros [3] = Blood Mage

Continuando, os números que estão acima como 1, 2 e o 3 será sorteado assim, como chamado de Random, mas para isso ele precisa virar um número Interger, assim:

Cria as Variaveis:

Dialog_Numero [1] = 1
Dialog_Numero [2] = 2
Dialog_Numero [3] = 3

Se essa variavel não for criado o Número Random não será sortiado, e assim o sistema de Random não funcionará.

Crie outra Variavel:

Dialog_Random_Numero = Math - Random Number - Random Interger Number between ( Preste atenção, aqui no caso de ter só 3 Heros eu colocarei 1 and 3, mas se tiver mais de 1 Hero você mudara o número 3, para a quantidade de Heros que Selecionou ) 1 and 3 

Agora vá em Unit - Create Units Facing Angel - Create Dialog_Heros[Dialod_Random_Numero] for Player 1 (Red) at ( Center ( aqui é o mesmo lugar onde o Hero nascerá ) Facing deafult building facing degrees, e não esqueça de Fecha a Caixa de Dialogo, Dialog - Dialog Show/Hide - Hide Dialog_Box for Player 1 (Red).


Com isso Encerramos o tutorial de hoje, espero que gostem.


{ 4 comentários... read them below or Comment }

  1. Unable to withdraw my coins in Gdax Customer Service
    Are you unable to withdraw coins in Gdax? Have you gotten in serious issues where you find it difficult to handle and resolve the error? If yes, instead of getting nervous or panic, you can immediately get in contact with the elite professionals by dialing Gdax Support Number +1-800-665-6722 which is functional all the time to attend the users. The skilled and talented professionals are always at your 24/7 service.
    Gdax Customer Support Number
    Gdax Phone Number
    For more info: https://www.cryptophonesupport.com/wallet/gdax/

    ResponderExcluir
  2. Do you want to fix transaction downloading issue in Binance? If yes, you can directly approach the professionals by dialing Binance support number. The professionals listen to your query and analyze the error, and accordingly deliver solutions in a very positive and managed way. They provide solutions and remedies through inventive tools and techniques. You can contact the skilled and talented professionals anytime as they are available 24/7 to assist the users.
    Website: https://www.cryptowalletsupport.com/binance-support-number/

    ResponderExcluir
  3. Trezor 2fa not working|Trezor support number
    Trezor two-factor authentication is an important feature in your account as it helps in securing your account from unwanted trouble. If you’re dealing with 2fa functionality issue and looking for solution to deal with it, make a call on on Trezor customer support number which is functional all the time. All you have to do is to call them and get verified solution from the team in no time. You can always take help from the team who is there to assist you and serve solutions that would help in fixing your error.
    Website: https://www.cryptowalletsupport.com/trezor-support-number/

    ResponderExcluir
  4. Fix connectivity errors in Binance|Binance support number
    Connectivity errors are quite annoying and should be treated on time to avoid issues. If you’re one of those users who get into Connectivity issues and don’t know how to handle them, they can always call on Binance support phone number which is functional all the time for help. The team is there to fix up your queries and you can always contact the team anytime. Whenever you are in trouble, connect with the team for availing result and productive in no time. You can count on them as services provided by them are highly out of the box and productive.

    ResponderExcluir

- Copyright © Against Attack - Date A Live - Powered by Blogger - Designed by Johanes Djogan -