Tuturial:sistema de selecion de héroes
Introducción:
Esta clase particular le demostrará varios métodos de sistemas de la selección del héroe.
Mucho AoS u orpg sistemas de la selección del héroe del uso de s que permiten que usted escoja a un héroe fuera de uno de los varios héroes disponibles en el juego. En este preceptoral; intento del ll para explicar tan bueno como sea posible en cómo crear tal sistema.
Un mapa será atado con todos los disparadores. Trabajan así que usted puede probarlos usted mismo.
Proceda al contenido a ver el índice de esta clase particular.
Cada disparador se escribe en GUI fácil entender para todos, contra: retraso posible) en la excepción de algunas escrituras de encargo.
MUY IMPORTANTE: estos disparadores de-no se han escapado. El pensamiento detrás de esto es que si usted necesita una clase particular para algo tan simple como esto, usted probablemente siente incomodidad de todo sobre ellos de todos modos. De cualquier manera, usted puede comprobar hacia fuera una clase particular en los escapes en este Web site para aprender más sobre ellos.
Índice
* Tabernas del héroe
* Círculo de los héroes de la energía
* Menú del diálogo
* Diálogo extendido (explicación adicional)
* El chascar/Doubleclicking
* Después/visión anterior del héroe Tabernas del héroe : Si usted jugó nunca un AoS (tal como defensa de los Ancients), usted ha visto ciertamente este sistema. Básicamente, usted tiene un círculo de la energía cerca de una taberna. En esta taberna usted puede seleccionar a uno de los varios héroes. Cada taberna puede vender solamente a hasta 12 héroes, pero usted puede agregar tabernas múltiples a su ofcourse del mapa.
Nota importante: Este sistema es levemente diferente de ésos considerados en los mapas del AoS. En caso de que usted quiera agregar seleccione al azar los modos etc., le recomiendo para transferir la plantilla de DotA en thehelper.net
Recomendado: Conocimiento básico del redactor del disparador y del redactor del objeto. Trabajos bien con 12 o más héroes.
Parte 1: La clase particular de la taberna
Los datos del objeto:
Comenzaremos con corregir los datos necesarios del objeto.
Primero, creamos a nuestro primer héroe y cambiamos los valores siguientes:
* Stats - Food Cost: 0
* Stats - Gold Cost: 0
* Stats - Lumber Cost: 0
* Stats - Stock Maximum: 1
* Stats - Stock Replenish Interval: 0
* Stats - Stock Start Delay: 0
Repetimos este proceso para cada héroe en el juego. En esta clase particular, hace esto a 4 héroes: Los 4 héroes humanos.
Crearemos después una nueva taberna. Creamos una nueva unidad y la basamos en la taberna. La unidad se establece bajo "Neutral, Building".
Cambiamos el valor siguiente:
Techtree - unidades vendidas: Agregue a todos los héroes a este valor. Si usted tiene más de 12 héroes, cree simplemente una segunda taberna y repita esta clase particular después del acabamiento él.
Los datos de mapa:
Usted necesita colocar la taberna que usted acaba de hacer en su mapa. Ahora agregue los círculos de la energía (theye situada unit palette under Neutral, Campaign) para cada jugador y los ponen al lado de la taberna.
Usted debe crear una región (en la gama de colores de la región) en el mapa donde usted quisiera que sus héroes frezaran. yo nombro a la region " HeroSpawn"
Los datos del disparador:
Las variables siguientes serán utilizadas en esta clase particular:
Las variables:
Name Tipo Valor inicial Arsenal
Nombre
Tipo
Valor inicial
Arsenal
Tavern1Heroes
Unidad-tipo
Vacío
100
HeroChosenByPlayer
Boolean
Falso
12
TempPoint
Punto
no
no
Éste es cómo mi disparador parece:
Usted puede abrir el redactor variable yendo al redactor del disparador y presionando el Control + B o alternativa yendo al editor, Variables
Primero creamos una nueva carpeta. Llámela Taberna Heroes
Creamos un nuevo disparador en esta carpeta, nosotros la llamamos Taberna Initialization Éste es cómo mi disparador parece:
Tavern Initialization
Events
Map initialization
Conditions
Actions
Set Tavern1Heroes[1] = Paladin (Tavern)
Set Tavern1Heroes[2] = Archmage (Tavern)
Set Tavern1Heroes[3] = Mountain King (Tavern)
Set Tavern1Heroes[4] = Blood Mage (Tavern)
-------- If you wish to add more than 4 units to the Tavern, you must add them here. -------
Este disparador agregará mis 4 héroe-tipos a una variable. Esto será utilizada más adelante. He hecho solamente a 4 héroes para esta clase particular, en caso de que usted tenga más héroes, apenas repito las acciones para todos los héroes.
Ahora necesitamos crear el disparador donde usted compra a un héroe y lo mueve al "HeroSpawn" región.
Events
Unit - A unit Sells a unit
Conditions
And - All (Conditions) are true
Conditions
((Sold unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
(Selling unit) Equal to Tavern 0000 <gen>
Primero agregamos los acontecimientos. Este disparador funcionará siempre que una unidad (tal como una taberna) venda otra unidad (tal como un héroe).
En las condiciones comprobamos si la unidad VENDIDA es un héroe, y si la unidad VENDEDORA es la taberna usted colocó en el mapa. Si usted tiene tabernas múltiples, usted agrega ésos al ( O - CONDITIONS )
Por ejemplo: si tengo tabernas múltiples, mi disparador parecerá esto: Events
Unit - A unit Sells a unit
Conditions
And - All (Conditions) are true
Conditions
((Sold unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
(Selling unit) Equal to Moon Tavern 0000 <gen>
(Selling unit) Equal to Sun Tavern 0001 <gen>
(Selling unit) Equal to Earth Tavern 0002 <gen> Después, agregaremos acciones. Ahora, nuestro disparador funcionará cuando una taberna vende a un héroe. ¿Qué debe entonces suceder tan?
Necesitamos comprobar si usted compró ya a un héroe. Cuando usted compró ya a un héroe, no permitida comprar a un segundo héroe! Quitaremos inmediatamente al segundo héroe en el " Entonces - Actions".
Si éste es su primer héroe, usted debe comprar al héroe y moverlo inmediatamente al " HeroSpawn" , donde usted puede comenzar el juego.
Tavern Hero Chosen
Events
Unit - A unit Sells a unit
Conditions
And - All (Conditions) are true
Conditions
((Sold unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
(Selling unit) Equal to Tavern 0000 <gen>
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to True
Then - Actions
Unit - Remove (Sold unit) from the game
Game - Display to (All players) the text: You already chose a...
Else - Actions
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
Unit - Move (Sold unit) instantly to (Center of HeroSpawn <gen>)
Camera - Pan camera for (Owner of (Sold unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
Selection - Clear selection for (Owner of (Sold unit))
Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
Espere un segundo. Ahora cada uno puede comprar al mismo héroe. Tan cada jugador podrá jugar con por ejemplo un paladín. ¿Ahora, no queremos probablemente ver a 12 paladines el luchar en el campo de batalla, hacemos? Si hacemos, se acaba su disparador. , Enciéndase con la clase particular.
agrega la acción siguiente:
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
Los gracias a esta acción, siempre que alguien compre a un héroe, este héroe estarán no más disponibles para todos los jugadores.
Su disparador final debe parecer esto:
Tavern Hero Chosen
Events
Unit - A unit Sells a unit
Conditions
And - All (Conditions) are true
Conditions
((Sold unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
(Selling unit) Equal to Tavern 0000 <gen>
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to True
Then - Actions
Unit - Remove (Sold unit) from the game
Game - Display to (All players) the text: You already chose a...
Else - Actions
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
Unit - Move (Sold unit) instantly to (Center of HeroSpawn <gen>)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
Camera - Pan camera for (Owner of (Sold unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
Selection - Clear selection for (Owner of (Sold unit))
Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
Voila, he explicado cómo crear una taberna. En el resto de esta clase particular, I' el ll explica a usted cómo al repick a su héroe y cómo seleccionarlo al azar.
Parte 2: Selección al azar
Al seleccionar al azar, usted hace que la computadora escoge para usted. Es decir: usted don' t sabe qué héroe you' el ll esté jugando. Todo en la clase particular anterior debe trabajar ya, pues emplearemos ella.
Los datos del objeto:
Vaya al redactor de la unidad y seleccione la brizna del duende de la noche. Corregiremos esta unidad (o, en caso de que you' el uso del ll una brizna en el juego, crea un nuevo basado en él).
Los valores siguientes serán cambiados:
* capacidades - Normal - ningunos
* Stats - Alimento costado: 0
* Stats - Oro costado: 0
* Stats - Madera de construcción costada: 0
* Stats - Máximo común: 0
* Stats - La acción llena intervalo
* texto - nombre: Escogedor del héroe
* texto - Tooltip - básico: Escogedor del héroe
* texto - Tooltip - extendido: ¡Seleccione al azar a su héroe!
Cerciórese de el " Stats - Almacene el delay" del comienzo; es 0
Finalmente, agregue su " wisp" (a.k.a escogedor del héroe) a su taberna. Observe que la taberna puede solamente tener 11 héroes ahora. Si usted utiliza a más héroes, agregúelos a otra taberna.
Los datos del disparador:
Haremos un disparador que funcione siempre que usted compre un Héroe y elija la unidad.
ejemplo
Events
Unit - A unit Sells a unit
Conditions
(Unit-type of (Sold unit)) Equal to Hero Chooser
En las acciones, QUITAREMOS el " Héroe Chooser" unidad porque ofcourse que no deseamos jugar con una brizna.
Después, crearemos a un héroe al azar.
Ofcourse que NECESITAMOS comprobar primero si usted compró ya a un héroe antes, así que creamos una acción de IF/THEN/ELSE.
Si usted no ha elegido a un héroe todavía, usted hará el " Entonces - Actions". En esas acciones creamos un " Tavern1Heroes" (ésos que usted fijó en el " Taberna Initialization" disparador al principio de la clase particular). En el arsenal I' el ll puso un número AL AZAR entre 1 y 4, porque tengo 4 héroes (el paladín, el rey de la montaña, el archmage y el bloodmage). Si tengo por ejemplo 6 héroes, solamente un número AL AZAR entre 1 y 6.
Éste es cómo el disparador parece:
Actions
Unit - Remove (Sold unit) from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to False
Then - Actions
Unit - Create 1 Tavern1Heroes[(Random integer number between 1 and 4)] for (Owner of (Sold unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
Else - Actions
Do nothing
Voila, that' s él. ¿Después en la clase particular? Repicking su héroe.
Parte 3: Repicking su héroe.
En muchos juegos (tales como DotA, refiero a menudo a esto no porque tengo gusto de él, pero porque cada uno sabe este mapa, por lo menos por nombre) usted puede repick su héroe después de elegirlo. Selecciona al azar generalmente a su héroe. , Para una vez, no seleccionaré al azar a su héroe y no permitiré que usted elija independientemente a un nuevo héroe.
Los datos de mapa
necesidad del ll que otra región se centró en la taberna. I' llamada del ll él " Tavern"
Los datos del disparador:
Necesitaremos más variables.
Las variables:
Nombre Tipo Valor inicial Arsenal
PlayerRepicked Boleano Falso 12
TempUnitGroup Grupo de unidad vacío ningunos
La autorización, así que nosotros queremos poder a REPICK su héroe. I' el ll hace un disparador esos repicks su héroe cuando cualquier jugador escribe el " - repick". Ofcourse, agregaré condiciones así que el ou no puede " repick" cuando usted no ha elegido a un héroe con todo o cuando usted repicked YA.
Events
Player - Player 1 (Red) types a chat message containing -repick as An exact match
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
Player - Player 7 (Green) types a chat message containing -repick as An exact match
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
Player - Player 9 (Gray) types a chat message containing -repick as An exact match
Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
Player - Player 11 (Dark Green) types a chat message containing -repick as An exact match
Player - Player 12 (Brown) types a chat message containing -repick as An exact match
Conditions
And - All (Conditions) are true
Conditions
Herochosenbyplayer[(Player number of (Triggering player))] Equal to True
PlayerRepicked[(Player number of (Triggering player))] Equal to False
Utilizaré la acción siguiente
Actions
Set TempUnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Loop - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
Unit - Remove (Picked unit) from the game
Custom script: call DestroyGroup(udg_TempUnitGroup)
se permitirá a tan cada jugador escoger al héroe que usted acaba de quitar.
La escritura de encargo se requiere para quitar un escape de memoria.
Después, su héroe debe ser quitado del juego y usted debe poder escoger un nuevo.
Actions
Game - Display to (All players) the text: ((Name of (Triggering player)) + has repicked a hero!)
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = False
Selection - Clear selection for (Triggering player)
Selection - Add Tavern 0000 <gen> to selection for (Triggering player)
Camera - Pan camera for (Triggering player) to (Center of Tavern <gen>) over 1.00 seconds
-------- If you only allow 1 repick per player, keep the action below --------
Set PlayerRepicked[(Player number of (Triggering player))] = True
-------- If you allow unlimited repicks per player, remove the action above --------
En total, usted debe tener el disparador siguiente:
Tavern Hero Repick
Events
Player - Player 1 (Red) types a chat message containing -repick as An exact match
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
Player - Player 7 (Green) types a chat message containing -repick as An exact match
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
Player - Player 9 (Gray) types a chat message containing -repick as An exact match
Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
Player - Player 11 (Dark Green) types a chat message containing -repick as An exact match
Player - Player 12 (Brown) types a chat message containing -repick as An exact match
Conditions
And - All (Conditions) are true
Conditions
Herochosenbyplayer[(Player number of (Triggering player))] Equal to True
PlayerRepicked[(Player number of (Triggering player))] Equal to False
Actions
Set TempUnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Loop - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
Unit - Remove (Picked unit) from the game
Custom script: call DestroyGroup(udg_TempUnitGroup)
Game - Display to (All players) the text: ((Name of (Triggering player)) + has repicked a hero!)
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = False
Selection - Clear selection for (Triggering player)
Selection - Add Tavern 0000 <gen> to selection for (Triggering player)
Camera - Pan camera for (Triggering player) to (Center of Tavern <gen>) over 1.00 seconds
-------- If you only allow 1 repick per player, keep the action below --------
Set PlayerRepicked[(Player number of (Triggering player))] = True
-------- If you allow unlimited repicks per player, remove the action above --------
Ahora, no hay nada tan molesto como alguien que los repicks su héroe en el medio del juego. Tan si queremos prohibir a jugadores de repicking a su héroe después e.g. de 45 segundos, agregamos el disparador siguiente:
Tavern Hero Repick disable
Events
Time - Elapsed game time is 45.00 seconds
Conditions
Actions
Trigger - Turn off Tavern Hero Repick <gen>
Trigger - Turn off (This trigger)
he dicho todo sobre el héroe repicking en tabernas.
Si usted tiene cualesquiera preguntas mandeme un mensaje a mi correo electronico
Círculo de los héroes de la energía
En muchos mapas de RPG usted entra en un área con muchos héroes que se colocan en círculos de la energía. Siempre que una unidad (generalmente una brizna) incorpore este círculo de la energía, usted gana a su héroe.
En mi ejemplo 1 uso del ll los 4 héroes de Orcos.
Los datos de mapa:
4 círculos de energía con 4 héroes de Orc. 1 brizna en el medio de ellos.
1 región (HeroSpawn) donde nuestros héroes frezarán.
Los datos del objeto:
I' el ll corrige la brizna tan it' s no más una brizna pero apenas una unidad usadas para seleccionar al héroe.
Los valores siguientes fueron cambiados:
* capacidades - Normal - ningunos
* Techtree - estructura de las estructuras - nada
* texto - nombre: Escogedor del héroe
tut6.jpg (5 of 6)
08-20-2007 02:18 PM
Los datos del disparador:
Nota: el disparador siguiente necesita ser hecho para CADA héroe seleccionable. Es decir: el ll termina para arriba con 4 disparadores, 1 para cada héroe. Comoes muy similar a cada otros, el ll hace solamente esto para 1 héroe en la clase particular:
Events
Unit - A unit comes within 100.00 of Blademaster 0012 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Chooser
Este disparador funcionará siempre que el Héroe Choosert (nuestra brizna corregida) viene cerca del Blademaster.
¿Qué quisiéramos tan que este disparador hiciera? Queremos crear un Blademaster para el dueño del escogedor del héroe.
Actions
Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
Esto crea el Blademaster.
Unit - Remove (Triggering unit) from the game
Esto quita al escogedor del héroe del juego. Nosotros don' t quisiera que él seleccionara a otro héroe otra vez.
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
Esto filtra la cámara en su nuevo Blademaster.
apagamos el disparador así que el Blademaster no se puede elegir por otro jugador.
Trigger - Turn off (This trigger)
Éste es tan cómo mi disparador final parece:
CoP Blademaster
Events
Unit - A unit comes within 100.00 of Blademaster 0012 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Chooser
Actions
Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
Unit - Remove (Triggering unit) from the game
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
Trigger - Turn off (This trigger)
Esto necesita ser repetida para cada héroe en el juego.
You need to upgrade your Flash Player or to allow javascript to enable Website menu.
Get Flash Player
buscador de gleogle
contador de visitas
chistes
hora
Hoy habia 11 visitantes (16 clics a subpáginas) ¡Aqui en esta página!