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.

[DUVIDA] Dummy unit com sistema andar e dar knock back

2 participantes

Ir para baixo

[DUVIDA] Dummy unit com sistema andar e dar knock back Empty [DUVIDA] Dummy unit com sistema andar e dar knock back

Mensagem por Devinganca 2014-03-05, 23:15

Parte 1

Abilidade Lanca
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Holy Arrown
    Actions
        Set Point[1] = (Position of Caster)
        Set Point[2] = (Position of Target)
        Set Caster = (Casting unit)
        Set Target = (Target unit of ability being cast)
        Unit - Create 1 Dumy Lance for (Owner of Caster) at Point[1] facing Point[2]
        Set Last_Dummy = (Last created unit)
        Trigger - Turn on Abilidade Lanca Loop
        Wait until ((Distance between (Position of Last_Dummy) and (Position of Target)) Less than or equal to 200.00), checking every 0.10 seconds
        Trigger - Turn off Abilidade Lanca Loop
        Trigger - Turn on Abilidade Lanca Knock Back
        Wait until ((Distance between (Position of Caster) and (Position of Target)) Greater than or equal to 600.00), checking every 0.10 seconds
        Trigger - Turn off Abilidade Lanca Loop

Parte 2

Abilidade Lanca Loop (Onde a dummy anda)
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Point[1] = (Position of Last_Dummy)
        Set Point[2] = (Point[1] offset by 20.00 towards (Facing of Caster) degrees)
        Special Effect - Create a special effect attached to the chest of Last_Dummy using Abilities\Weapons\Bolt\BoltImpact.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Move Last_Dummy instantly to Point[2]
        Unit - Make Last_Dummy face Target over 0.01 seconds
        Custom script:   call RemoveLocation(udg_Point[1])
        Custom script:   call RemoveLocation(udg_Point[2])

Parte 3 Knock Back

Abilidade Lanca Knock Back
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Point[1] = (Position of Target)
        Set Point[2] = (Point[1] offset by 20.00 towards (Facing of Last_Dummy) degrees)
        Special Effect - Create a special effect attached to the origin of Target using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Move Target instantly to Point[2]
        Unit - Make Target face Last_Dummy over 0.01 seconds
        Custom script:   call RemoveLocation(udg_Point[1])
        Custom script:   call RemoveLocation(udg_Point[2])

Se Alguem souber onde esta o erro ai eu agradeço Boa noite xD Video do Erro para mais imformação..
Devinganca
Devinganca

Número de Posts : 37
Data de inscrição : 14/11/2011
Reputação : 9 Pontos : 23268

Warning Necropost
[DUVIDA] Dummy unit com sistema andar e dar knock back Left_bar_bleue0 / 1000 / 100[DUVIDA] Dummy unit com sistema andar e dar knock back Right_bar_bleue


Ir para o topo Ir para baixo

[DUVIDA] Dummy unit com sistema andar e dar knock back Empty Re: [DUVIDA] Dummy unit com sistema andar e dar knock back

Mensagem por Gilgamesh 2014-03-06, 14:27

Devinganca escreveu:Parte 1

Abilidade Lanca
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Holy Arrown
    Actions
        Set Point[1] = (Position of Caster)
        Set Point[2] = (Position of Target)
        Set Caster = (Casting unit)
        Set Target = (Target unit of ability being cast)
        Unit - Create 1 Dumy Lance for (Owner of Caster) at Point[1] facing Point[2]
        Set Last_Dummy = (Last created unit)
        Trigger - Turn on Abilidade Lanca Loop
        Wait until ((Distance between (Position of Last_Dummy) and (Position of Target)) Less than or equal to 200.00), checking every 0.10 seconds
        Trigger - Turn off Abilidade Lanca Loop
        Trigger - Turn on Abilidade Lanca Knock Back
        Wait until ((Distance between (Position of Caster) and (Position of Target)) Greater than or equal to 600.00), checking every 0.10 seconds
        Trigger - Turn off Abilidade Lanca Loop

Parte 2

Abilidade Lanca Loop (Onde a dummy anda)
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Point[1] = (Position of Last_Dummy)
        Set Point[2] = (Point[1] offset by 20.00 towards (Facing of Caster) degrees)
        Special Effect - Create a special effect attached to the chest of Last_Dummy using Abilities\Weapons\Bolt\BoltImpact.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Move Last_Dummy instantly to Point[2]
        Unit - Make Last_Dummy face Target over 0.01 seconds
        Custom script:   call RemoveLocation(udg_Point[1])
        Custom script:   call RemoveLocation(udg_Point[2])

Parte 3 Knock Back

Abilidade Lanca Knock Back
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Point[1] = (Position of Target)
        Set Point[2] = (Point[1] offset by 20.00 towards (Facing of Last_Dummy) degrees)
        Special Effect - Create a special effect attached to the origin of Target using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Move Target instantly to Point[2]
        Unit - Make Target face Last_Dummy over 0.01 seconds
        Custom script:   call RemoveLocation(udg_Point[1])
        Custom script:   call RemoveLocation(udg_Point[2])

Se Alguem souber onde esta o erro ai eu agradeço Boa noite xD Video do Erro para mais imformação..

O Erro não tá só na trigger em si, mas no seu método de programar. Notei que em todas as triggers e skills você utiliza variáveis globais com o mesmo nome. Isso quer dizer que sempre que uma nova habilidade for castada, ou sempre que um gatilho for acionado, o valor armazenado nessa variável será alterado.

Exemplo: Criei a variável DISTÂNCIA[1].

Sempre que eu usar a magia "Bola de Fogo", a variável DISTÂNCIA[1] será igual a 500; a bola de fogo vai se se mover até atingir um alvo OU até chegar à uma distância igual ou superior a DISTÂNCIA[1] que nesse caso é 500;

Agora digamos que antes da "Bola de Fogo" atingir os 500 de distância, eu utilizo uma outra spell que possui essa mesma variável DISTÂNCIA[1]; Nesse caso o valor da variável DISTÂNCIA[1] será modificado, causando erro na trigger da "Bola de Fogo" que está esperando pelo 500.

Em outras palavras; Se a "Bola de Fogo" estiver a 450 de distância, faltando apenas 50 de distância para se destruir, e a variável DISTÂNCIA[1] for modificada para 300, a Bola de Fogo não será destruída nunca ou terá sua durabilidade modificada.

O que se deve entender é que, Variáveis Globais não funcionam só na trigger em que você as insere; o próprio nome já diz, elas são Globais e funcionam em todas as triggers.

Mais o que eu faço?
Recomendo que comece a converter suas triggers para "Custom Text", também conhecido como Jass, e então passe a utilizar variáveis locais. Existem uns bons tutoriais por aqui e pela web ensinando Jass desde o começo, mas o primeiro passo é tentar.  Wink 
Gilgamesh
Gilgamesh

Número de Posts : 313
Data de inscrição : 11/05/2013
Reputação : 69 Pontos : 23504

Warning Necropost
[DUVIDA] Dummy unit com sistema andar e dar knock back Left_bar_bleue0 / 1000 / 100[DUVIDA] Dummy unit com sistema andar e dar knock back Right_bar_bleue


http://www.DotCastleBR.forumeiros.com

Ir para o topo Ir para baixo

[DUVIDA] Dummy unit com sistema andar e dar knock back Empty Re: [DUVIDA] Dummy unit com sistema andar e dar knock back

Mensagem por Devinganca 2014-03-06, 17:47

vlw pela dica mass jass eu nao manjo vou tentar aqui
Devinganca
Devinganca

Número de Posts : 37
Data de inscrição : 14/11/2011
Reputação : 9 Pontos : 23268

Warning Necropost
[DUVIDA] Dummy unit com sistema andar e dar knock back Left_bar_bleue0 / 1000 / 100[DUVIDA] Dummy unit com sistema andar e dar knock back Right_bar_bleue


Ir para o topo Ir para baixo

[DUVIDA] Dummy unit com sistema andar e dar knock back Empty Re: [DUVIDA] Dummy unit com sistema andar e dar knock back

Mensagem por Gilgamesh 2014-03-06, 20:38

Questão Resolvida
Tópico Bloqueado & Movido
Gilgamesh
Gilgamesh

Número de Posts : 313
Data de inscrição : 11/05/2013
Reputação : 69 Pontos : 23504

Warning Necropost
[DUVIDA] Dummy unit com sistema andar e dar knock back Left_bar_bleue0 / 1000 / 100[DUVIDA] Dummy unit com sistema andar e dar knock back Right_bar_bleue


http://www.DotCastleBR.forumeiros.com

Ir para o topo Ir para baixo

[DUVIDA] Dummy unit com sistema andar e dar knock back Empty Re: [DUVIDA] Dummy unit com sistema andar e dar knock back

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