TeaM KingS
[center]Ola Convidado, seja bem vindo ao TeaM KingS !

Nós temos tutoriais sobre o WarCraft World Editor: se você tiver alguma duvida pode perguntar que os moderadores ou membros experientes vão lhe ajudar.

Para melhor utilizar nossos recursos é extremamente recomendado que esteja logado em nosso fórum e que leia o nosso regulamento oficial.

Também temos fóruns sobre DotA AllstarS, com guias, estratégias, e muito mais!




Participe do fórum, é rápido e fácil

TeaM KingS
[center]Ola Convidado, seja bem vindo ao TeaM KingS !

Nós temos tutoriais sobre o WarCraft World Editor: se você tiver alguma duvida pode perguntar que os moderadores ou membros experientes vão lhe ajudar.

Para melhor utilizar nossos recursos é extremamente recomendado que esteja logado em nosso fórum e que leia o nosso regulamento oficial.

Também temos fóruns sobre DotA AllstarS, com guias, estratégias, e muito mais!


TeaM KingS
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Ajuda em um Sistema

2 participantes

Ir para baixo

Ajuda em um Sistema  Empty Ajuda em um Sistema

Mensagem por YnB 2014-04-15, 14:01

Então, sou novo aqui. Desculpe qualquer coisa.

Bom, eu gostaria de fazer um sistema bem simples: criar um special effect em uma unidade, só que a unidade é o Hero que tem mais kills.
Todos os heros já tem suas Variáveis setadas e tudo mais, as variáveis "Quantidade de kills(vamos dizer assim)" já existem.
Só preciso saber como eu faço para que o sistema reconheça entre 10 variaveis(integer), a que tiver o maior valor...

Agradeço desde já.
YnB
YnB

Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 18715

Warning Necropost
Ajuda em um Sistema  Left_bar_bleue0 / 1000 / 100Ajuda em um Sistema  Right_bar_bleue


Ir para o topo Ir para baixo

Ajuda em um Sistema  Empty Re: Ajuda em um Sistema

Mensagem por Law.Terro 2014-04-16, 18:01

Uma coisa: Você precisa dar a mostra o Sistema de Kills pra a gente da uma regulada e fazer tudo direitinho,  e depois verificar se da pra fazer uma coisa como essa.
Law.Terro
Law.Terro

Número de Posts : 1243
Data de inscrição : 18/07/2011
Reputação : 107 Pontos : 29972

Warning Necropost
Ajuda em um Sistema  Left_bar_bleue0 / 1000 / 100Ajuda em um Sistema  Right_bar_bleue


http://againstattack.blogspot.com.br/

Ir para o topo Ir para baixo

Ajuda em um Sistema  Empty Re: Ajuda em um Sistema

Mensagem por YnB 2014-04-16, 23:25

Consegui fazer !
....
PlayerKills(1) = Quantidade de Kills do player 1
PlayerKills(2) = Quantidade de Kills do player 2
...
PlayerHero(1) = Unidade Hero do player 1
PlayerHero(2) = Unidade Hero do player 2
...
Coloquei um WAIT no inicio pra dar tempo da outra trigger atualizar a variavel "PlayerKills"(nao sei se precisava, mas achei bom...)
...
Código:
Killer King Effect
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        ((Owner of (Dying unit)) is an enemy of (Owner of (Killing unit))) Equal to True
    Actions
        Wait 0.10 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[1] Greater than PlayerKills[2]
                PlayerKills[1] Greater than PlayerKills[3]
                PlayerKills[1] Greater than PlayerKills[4]
                PlayerKills[1] Greater than PlayerKills[5]
                PlayerKills[1] Greater than PlayerKills[6]
                PlayerKills[1] Greater than PlayerKills[7]
                PlayerKills[1] Greater than PlayerKills[8]
                PlayerKills[1] Greater than PlayerKills[9]
                PlayerKills[1] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[1])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[1] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[2] Greater than PlayerKills[1]
                PlayerKills[2] Greater than PlayerKills[3]
                PlayerKills[2] Greater than PlayerKills[4]
                PlayerKills[2] Greater than PlayerKills[5]
                PlayerKills[2] Greater than PlayerKills[6]
                PlayerKills[2] Greater than PlayerKills[7]
                PlayerKills[2] Greater than PlayerKills[8]
                PlayerKills[2] Greater than PlayerKills[9]
                PlayerKills[2] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[2])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[2] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[3] Greater than PlayerKills[1]
                PlayerKills[3] Greater than PlayerKills[2]
                PlayerKills[3] Greater than PlayerKills[4]
                PlayerKills[3] Greater than PlayerKills[5]
                PlayerKills[3] Greater than PlayerKills[6]
                PlayerKills[3] Greater than PlayerKills[7]
                PlayerKills[3] Greater than PlayerKills[8]
                PlayerKills[3] Greater than PlayerKills[9]
                PlayerKills[3] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[3])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[3] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[4] Greater than PlayerKills[1]
                PlayerKills[4] Greater than PlayerKills[2]
                PlayerKills[4] Greater than PlayerKills[3]
                PlayerKills[4] Greater than PlayerKills[5]
                PlayerKills[4] Greater than PlayerKills[6]
                PlayerKills[4] Greater than PlayerKills[7]
                PlayerKills[4] Greater than PlayerKills[8]
                PlayerKills[4] Greater than PlayerKills[9]
                PlayerKills[4] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[4])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[4] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[5] Greater than PlayerKills[1]
                PlayerKills[5] Greater than PlayerKills[2]
                PlayerKills[5] Greater than PlayerKills[3]
                PlayerKills[5] Greater than PlayerKills[4]
                PlayerKills[5] Greater than PlayerKills[6]
                PlayerKills[5] Greater than PlayerKills[7]
                PlayerKills[5] Greater than PlayerKills[8]
                PlayerKills[5] Greater than PlayerKills[9]
                PlayerKills[5] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[5])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[5] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[6] Greater than PlayerKills[1]
                PlayerKills[6] Greater than PlayerKills[2]
                PlayerKills[6] Greater than PlayerKills[3]
                PlayerKills[6] Greater than PlayerKills[4]
                PlayerKills[6] Greater than PlayerKills[5]
                PlayerKills[6] Greater than PlayerKills[7]
                PlayerKills[6] Greater than PlayerKills[8]
                PlayerKills[6] Greater than PlayerKills[9]
                PlayerKills[6] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[6])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[6] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[7] Greater than PlayerKills[1]
                PlayerKills[7] Greater than PlayerKills[2]
                PlayerKills[7] Greater than PlayerKills[3]
                PlayerKills[7] Greater than PlayerKills[4]
                PlayerKills[7] Greater than PlayerKills[5]
                PlayerKills[7] Greater than PlayerKills[6]
                PlayerKills[7] Greater than PlayerKills[8]
                PlayerKills[7] Greater than PlayerKills[9]
                PlayerKills[7] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[7])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[7] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[8] Greater than PlayerKills[1]
                PlayerKills[8] Greater than PlayerKills[2]
                PlayerKills[8] Greater than PlayerKills[3]
                PlayerKills[8] Greater than PlayerKills[4]
                PlayerKills[8] Greater than PlayerKills[5]
                PlayerKills[8] Greater than PlayerKills[6]
                PlayerKills[8] Greater than PlayerKills[7]
                PlayerKills[8] Greater than PlayerKills[9]
                PlayerKills[8] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[8])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[8] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[9] Greater than PlayerKills[1]
                PlayerKills[9] Greater than PlayerKills[2]
                PlayerKills[9] Greater than PlayerKills[3]
                PlayerKills[9] Greater than PlayerKills[4]
                PlayerKills[9] Greater than PlayerKills[5]
                PlayerKills[9] Greater than PlayerKills[6]
                PlayerKills[9] Greater than PlayerKills[7]
                PlayerKills[9] Greater than PlayerKills[8]
                PlayerKills[9] Greater than PlayerKills[10]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[9])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[9] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerKills[10] Greater than PlayerKills[1]
                PlayerKills[10] Greater than PlayerKills[2]
                PlayerKills[10] Greater than PlayerKills[3]
                PlayerKills[10] Greater than PlayerKills[4]
                PlayerKills[10] Greater than PlayerKills[5]
                PlayerKills[10] Greater than PlayerKills[6]
                PlayerKills[10] Greater than PlayerKills[7]
                PlayerKills[10] Greater than PlayerKills[8]
                PlayerKills[10] Greater than PlayerKills[9]
            Then - Actions
                Custom script: call RemoveLocation(udg_KillerKingEffectPoint)
                Special Effect - Destroy KillerKingSEffect
                Set KillerKingEffectPoint = (Position of PlayerHero[10])
                Special Effect - Create a special effect attached to the overhead of PlayerHero[10] using Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
                Set KillerKingSEffect = (Last created special effect)
            Else - Actions
...
Ficou estupidamente grande, mas foi o único jeito que consegui fazer.
Se você sabe de um outro modo melhor, me diga por favor.
Também não sei se consegui tirar os leaks, será que não vai dar problema ?
... Até + !  Very Happy
YnB
YnB

Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 18715

Warning Necropost
Ajuda em um Sistema  Left_bar_bleue0 / 1000 / 100Ajuda em um Sistema  Right_bar_bleue


Ir para o topo Ir para baixo

Ajuda em um Sistema  Empty Re: Ajuda em um Sistema

Mensagem por Law.Terro 2014-04-17, 19:25

Se tratando de um sistema, e se você for usar em um mapa longo, com certeza é melhor você tirar todos os leaks possíveis, falo por experiencia própria kkk
Bom, eu não sei muito de sistemas, e eu mal estou entrando no forum por estar muito ocupado =/ vou tentar fazer o possível Smile
Law.Terro
Law.Terro

Número de Posts : 1243
Data de inscrição : 18/07/2011
Reputação : 107 Pontos : 29972

Warning Necropost
Ajuda em um Sistema  Left_bar_bleue0 / 1000 / 100Ajuda em um Sistema  Right_bar_bleue


http://againstattack.blogspot.com.br/

Ir para o topo Ir para baixo

Ajuda em um Sistema  Empty Re: Ajuda em um Sistema

Mensagem por YnB 2014-04-17, 20:28

Smile
YnB
YnB

Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 18715

Warning Necropost
Ajuda em um Sistema  Left_bar_bleue0 / 1000 / 100Ajuda em um Sistema  Right_bar_bleue


Ir para o topo Ir para baixo

Ajuda em um Sistema  Empty Re: Ajuda em um Sistema

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

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