Ajuda em um Sistema
2 participantes
TeaM KingS :: Games: :: Warcraft: World Editor :: ::
Página 1 de 1
Ajuda em um Sistema
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á.
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- Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 19770
Re: Ajuda em um Sistema
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.
Re: Ajuda em um Sistema
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...)
...
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é + !
....
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é + !
YnB- Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 19770
Re: Ajuda em um Sistema
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
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
YnB- Número de Posts : 13
Data de inscrição : 11/02/2014
Reputação : 1 Pontos : 19770
Tópicos semelhantes
» [Ajuda] Sistema de Tocha
» Me ajuda com Sistema de Hero
» [AJUDA] Sistema de skills por Spellbook
» Ajuda num sistema complicado.
» [AJUDA] Sistema de Ranks
» Me ajuda com Sistema de Hero
» [AJUDA] Sistema de skills por Spellbook
» Ajuda num sistema complicado.
» [AJUDA] Sistema de Ranks
TeaM KingS :: Games: :: Warcraft: World Editor :: ::
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos