[Tutorial]Kick System
2 participantes
TeaM KingS :: Games: :: Warcraft: World Editor :: Tutoriais: Gui, Jass, Spells, Terrain, Modelagem, Textura :: Triggers(GUI)
Página 1 de 1
[Tutorial]Kick System
Como ta no titulo do tópico, isso é um tutorial de kick system pára o host, eu só não faço um mapa tutorial porque eu to com preguiça '-'
Eu MONTEI dois jeitos de kick system, um é -kick (color) e o outro é -kick (number), eu vou ensinar o da color.
Variáveis -
KickSystem (String)
Herois (Unit Array (1))
1º Definir hero - Para definir o hero, coloque essa variável depois do creat hero (Sua trigger para selecionar hero)
Set Herois[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Exemplo:
Unit - Create 1 Nevermore for (Owner of (Triggering unit)) at (Center of Centro do mapa) facing Default building facing degrees
Set Herois[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
2º Trigger -
1º - Faça um evento com Text Message igual ao de baixo:
Events
Player - Player 1 (Red) types a chat message containing -kick as A substring <<<< SUBSTRING
(CUIDADO! TEM UM ESPAÇO DO LADO DO -KICK (containing -"kick " as A substring!!!)
2º - Agora você terá que modificar a variável KickSystem, faça que nem o exemplo abaixo:
Set KickSystem = (Substring((Entered chat string), 7, 16)) "7 é a ordem das letras do chat message, ou seja -kick tem 6 letras (contando com o espaço) então 7 vai ser a primeira letra da cor"
3º - Crie uma "If (All Conditions are True) then do (Then Actions) else do (Else Actions)" e na Conditions você coloca:
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing (Verificar se o jogador está no jogo)
KickSystem Equal to blue (se a variável KickSystem é igual a blue)
e na Then - Actions você coloca:
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + foi kickado!)
Unit - Remove Herois[2] from the game (Remover o hero do player)
Game - Defeat Player 2 (Blue) with the message: Você foi kickado! (Vai dar um "kick")
Então você repete o passo 3 modificando o player até o 12!
e por fim a Trigger ficara assim:
Events
Player - Player 1 (Red) types a chat message containing -kick as A substring
Conditions
Actions
Set KickSystem = (Substring((Entered chat string), 7, 16))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
KickSystem Equal to blue
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + foi kickado!)
Unit - Remove Herois[2] from the game
Game - Defeat Player 2 (Blue) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
KickSystem Equal to teal
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + foi kickado!)
Unit - Remove Herois[3] from the game
Game - Defeat Player 3 (Teal) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
KickSystem Equal to purple
Then - Actions
Game - Display to (All players) the text: ((Name of Player 4 (Purple)) + foi kickado!)
Unit - Remove Herois[4] from the game
Game - Defeat Player 4 (Purple) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) slot status) Equal to Is playing
KickSystem Equal to yellow
Then - Actions
Game - Display to (All players) the text: ((Name of Player 5 (Yellow)) + foi kickado!)
Unit - Remove Herois[5] from the game
Game - Defeat Player 5 (Yellow) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) slot status) Equal to Is playing
KickSystem Equal to orange
Then - Actions
Game - Display to (All players) the text: ((Name of Player 6 (Orange)) + foi kickado!)
Unit - Remove Herois[6] from the game
Game - Defeat Player 6 (Orange) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Is playing
KickSystem Equal to green
Then - Actions
Game - Display to (All players) the text: ((Name of Player 7 (Green)) + foi kickado!)
Unit - Remove Herois[7] from the game
Game - Defeat Player 7 (Green) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 8 (Pink) slot status) Equal to Is playing
KickSystem Equal to pink
Then - Actions
Game - Display to (All players) the text: ((Name of Player 8 (Pink)) + foi kickado!)
Unit - Remove Herois[8] from the game
Game - Defeat Player 8 (Pink) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 9 (Gray) slot status) Equal to Is playing
KickSystem Equal to gray
Then - Actions
Game - Display to (All players) the text: ((Name of Player 9 (Gray)) + foi kickado!)
Unit - Remove Herois[9] from the game
Game - Defeat Player 9 (Gray) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 10 (Light Blue) slot status) Equal to Is playing
KickSystem Equal to lightblue
Then - Actions
Game - Display to (All players) the text: ((Name of Player 10 (Light Blue)) + foi kickado!)
Unit - Remove Herois[10] from the game
Game - Defeat Player 10 (Light Blue) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 11 (Dark Green) slot status) Equal to Is playing
KickSystem Equal to darkgreen
Then - Actions
Game - Display to (All players) the text: ((Name of Player 11 (Dark Green)) + foi kickado!)
Unit - Remove Herois[11] from the game
Game - Defeat Player 11 (Dark Green) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 12 (Brown) slot status) Equal to Is playing
KickSystem Equal to brown
Then - Actions
Game - Display to (All players) the text: ((Name of Player 12 (Brown)) + foi kickado!)
Unit - Remove Herois[12] from the game
Game - Defeat Player 12 (Brown) with the message: Você foi kickado!
Else - Actions
Eu MONTEI dois jeitos de kick system, um é -kick (color) e o outro é -kick (number), eu vou ensinar o da color.
Variáveis -
KickSystem (String)
Herois (Unit Array (1))
1º Definir hero - Para definir o hero, coloque essa variável depois do creat hero (Sua trigger para selecionar hero)
Set Herois[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Exemplo:
Unit - Create 1 Nevermore for (Owner of (Triggering unit)) at (Center of Centro do mapa
Set Herois[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
2º Trigger -
1º - Faça um evento com Text Message igual ao de baixo:
Events
Player - Player 1 (Red) types a chat message containing -kick as A substring <<<< SUBSTRING
(CUIDADO! TEM UM ESPAÇO DO LADO DO -KICK (containing -"kick " as A substring!!!)
2º - Agora você terá que modificar a variável KickSystem, faça que nem o exemplo abaixo:
Set KickSystem = (Substring((Entered chat string), 7, 16)) "7 é a ordem das letras do chat message, ou seja -kick tem 6 letras (contando com o espaço) então 7 vai ser a primeira letra da cor"
3º - Crie uma "If (All Conditions are True) then do (Then Actions) else do (Else Actions)" e na Conditions você coloca:
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing (Verificar se o jogador está no jogo)
KickSystem Equal to blue (se a variável KickSystem é igual a blue)
e na Then - Actions você coloca:
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + foi kickado!)
Unit - Remove Herois[2] from the game (Remover o hero do player)
Game - Defeat Player 2 (Blue) with the message: Você foi kickado! (Vai dar um "kick")
Então você repete o passo 3 modificando o player até o 12!
e por fim a Trigger ficara assim:
Events
Player - Player 1 (Red) types a chat message containing -kick as A substring
Conditions
Actions
Set KickSystem = (Substring((Entered chat string), 7, 16))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
KickSystem Equal to blue
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + foi kickado!)
Unit - Remove Herois[2] from the game
Game - Defeat Player 2 (Blue) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
KickSystem Equal to teal
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + foi kickado!)
Unit - Remove Herois[3] from the game
Game - Defeat Player 3 (Teal) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
KickSystem Equal to purple
Then - Actions
Game - Display to (All players) the text: ((Name of Player 4 (Purple)) + foi kickado!)
Unit - Remove Herois[4] from the game
Game - Defeat Player 4 (Purple) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) slot status) Equal to Is playing
KickSystem Equal to yellow
Then - Actions
Game - Display to (All players) the text: ((Name of Player 5 (Yellow)) + foi kickado!)
Unit - Remove Herois[5] from the game
Game - Defeat Player 5 (Yellow) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) slot status) Equal to Is playing
KickSystem Equal to orange
Then - Actions
Game - Display to (All players) the text: ((Name of Player 6 (Orange)) + foi kickado!)
Unit - Remove Herois[6] from the game
Game - Defeat Player 6 (Orange) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Is playing
KickSystem Equal to green
Then - Actions
Game - Display to (All players) the text: ((Name of Player 7 (Green)) + foi kickado!)
Unit - Remove Herois[7] from the game
Game - Defeat Player 7 (Green) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 8 (Pink) slot status) Equal to Is playing
KickSystem Equal to pink
Then - Actions
Game - Display to (All players) the text: ((Name of Player 8 (Pink)) + foi kickado!)
Unit - Remove Herois[8] from the game
Game - Defeat Player 8 (Pink) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 9 (Gray) slot status) Equal to Is playing
KickSystem Equal to gray
Then - Actions
Game - Display to (All players) the text: ((Name of Player 9 (Gray)) + foi kickado!)
Unit - Remove Herois[9] from the game
Game - Defeat Player 9 (Gray) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 10 (Light Blue) slot status) Equal to Is playing
KickSystem Equal to lightblue
Then - Actions
Game - Display to (All players) the text: ((Name of Player 10 (Light Blue)) + foi kickado!)
Unit - Remove Herois[10] from the game
Game - Defeat Player 10 (Light Blue) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 11 (Dark Green) slot status) Equal to Is playing
KickSystem Equal to darkgreen
Then - Actions
Game - Display to (All players) the text: ((Name of Player 11 (Dark Green)) + foi kickado!)
Unit - Remove Herois[11] from the game
Game - Defeat Player 11 (Dark Green) with the message: Você foi kickado!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 12 (Brown) slot status) Equal to Is playing
KickSystem Equal to brown
Then - Actions
Game - Display to (All players) the text: ((Name of Player 12 (Brown)) + foi kickado!)
Unit - Remove Herois[12] from the game
Game - Defeat Player 12 (Brown) with the message: Você foi kickado!
Else - Actions
Última edição por mustredi em 2012-03-31, 23:52, editado 1 vez(es)
Re: [Tutorial]Kick System
Como sempre, vou fazer meu papel de chato aqui...
Não, isso não é um tutorial, isso é uma tentativa frustada de fazer um tutorial, você não explicou NADA para quem vai ler o ''tutorial'' você simplesmente fez a trigger e postou, ISSO NÃO É UM TUTORIAL.
Sem falar que isso deveria ser postado na area de Spells/System por ser um Resource.
Se não me engano, você usou o Copy As Text para colar as triggers aqui, ou seja, a trigger já estava pronta, era só salvar o mapa e upa-lo no epicwar, já que você não explicou nada, o mínimo era você postar um mapa demo.
Não, você não inventou, eles já existem faz tempo, você só reproduziu.
mustredi escreveu:isso é um tutorial
Não, isso não é um tutorial, isso é uma tentativa frustada de fazer um tutorial, você não explicou NADA para quem vai ler o ''tutorial'' você simplesmente fez a trigger e postou, ISSO NÃO É UM TUTORIAL.
Sem falar que isso deveria ser postado na area de Spells/System por ser um Resource.
mustredi escreveu:só não faço um mapa tutorial porque eu to com preguiça '-'
Se não me engano, você usou o Copy As Text para colar as triggers aqui, ou seja, a trigger já estava pronta, era só salvar o mapa e upa-lo no epicwar, já que você não explicou nada, o mínimo era você postar um mapa demo.
mustredi escreveu:Eu inventei dois jeitos de kick system
Não, você não inventou, eles já existem faz tempo, você só reproduziu.
VicToR- Número de Posts : 2002
Data de inscrição : 19/12/2010
Reputação : 243 Pontos : 26800
Re: [Tutorial]Kick System
VicToR ;D escreveu:Se não me engano, você usou o Copy As Text para colar as triggers aqui, ou seja, a trigger já estava pronta, era só salvar o mapa e upa-lo no epicwar, já que você não explicou nada, o mínimo era você postar um mapa demo.
a trigger tava pronta, mas no meu mapa pessoal, então eu teria que tirar o bloqueio do meu mapa para postar aqui, que talvez surgirá copias ou não...
Eu já editei o topico...
Tópicos semelhantes
» [Tutorial] Criando um ''Sistema de Kick'' (Incompleto)
» [TUTORIAL] PvP System
» [Tutorial] Difficulty System - Incompleto
» (tutorial/system/spell)KnockBack MUI
» [TUTORIAL] Save/Load System
» [TUTORIAL] PvP System
» [Tutorial] Difficulty System - Incompleto
» (tutorial/system/spell)KnockBack MUI
» [TUTORIAL] Save/Load System
TeaM KingS :: Games: :: Warcraft: World Editor :: Tutoriais: Gui, Jass, Spells, Terrain, Modelagem, Textura :: Triggers(GUI)
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|