Noticias:

Links interesantes
Estos son vínculos que llevan a contenido de uso permanente o importante para varios grados o temáticas particulares.

Menú principal

Diseño de Minijuegos

Publicado por moyack, Septiembre 30, 2018, 06:21:00 PM

moyack

En este tema pondremos en práctica el uso de los minijuegos. Para ello trabajaremos con un ejemplo desarrollado por @moyack y con ello se analizaran como se construyeron los detonadores.

DETONADORES:

Melee Initialization
    Acontecimientos
        Map initialization
    Condiciones
    Acciones
        Partida - Set the time of day to 18.00
        Wait 2.00 seconds
        Partida - Display to (All players) the text: Bienvenidos al mapa...
        Selección - Select Cazador de Demonios 0001 <gen> for Jugador 1 (rojo)
        Wait 1.00 seconds
        Secuencia cinematográfica - Ping minimap for Grupo jugador: Jugador 1 (rojo) at (Center of Entrenamiento de unidades <gen>) for 10.00 seconds


Aliados
    Acontecimientos
        Unidad - A unit enters Entrenamiento de unidades <gen>
    Condiciones
        (Triggering unit) Igual a Cazador de Demonios 0001 <gen>
    Acciones
        Sonido - Play Doom <gen>
        Unidad - Create 3 Cazadora for Jugador 1 (rojo) at (Center of Entrenamiento de unidades <gen>) facing (Facing of (Triggering unit)) degrees
        Set Aliados = (Last created unit group)
        Secuencia cinematográfica - Clear the screen of text messages for Grupo jugador: Jugador 1 (rojo)
        Partida - Display to (All players) the text: Las unidades aliada...
        Secuencia cinematográfica - Ping minimap for (Player group((Owner of Cazador de Demonios 0001 <gen>))) at (Center of Enemigos <gen>) for 10.00 seconds, using a Intenso ping of color (100.00%, 0.00%, 0.00%)
        Detonador - Turn on Envio de enemigos <gen>
        Detonador - Turn on Mostrar base enemiga <gen>
        Detonador - Turn off (This trigger)


Envio de enemigos
    Acontecimientos
        Tiempo - Every 5.00 seconds of game time
    Condiciones
    Acciones
        Unidad - Create (((Hero level of Cazador de Demonios 0001 <gen>) / 6) + 1) Lobo Maderero for Jugador 12 (marrón) at (Center of Enemigos <gen>) facing Vista edificio predeterminada degrees
        Grupo de unidad - Add all units of (Last created unit group) to Enemigos
        Grupo de unidad - Pick every unit in (Units owned by Jugador 12 (marrón)) and do (Actions)
            Bucle: Acciones
                Unidad - Order (Picked unit) to Atacar-mover a (Position of Cazador de Demonios 0001 <gen>)
        Grupo de unidad - Pick every unit in Aliados and do (Actions)
            Bucle: Acciones
                Unidad - Order (Picked unit) to Atacar-mover a (Position of Zigurat Nerubian 0003 <gen>)


Mostrar base enemiga
    Acontecimientos
        Tiempo - Every 10.00 seconds of game time
    Condiciones
    Acciones
        Secuencia cinematográfica - Ping minimap for (Player group((Owner of Cazador de Demonios 0001 <gen>))) at (Center of Enemigos <gen>) for 5.00 seconds, using a Intenso ping of color (100.00%, 0.00%, 0.00%)


Muerte de aliado
    Acontecimientos
        Unidad - A unit Muere
    Condiciones
        (Owner of (Triggering unit)) Igual a Jugador 1 (rojo)
        (Triggering unit) No igual a Cazador de Demonios 0001 <gen>
    Acciones
        Sonido - Play HuntressWarcry1 <gen> at 100.00% volume, located at (Center of Entrenamiento de unidades <gen>) with Z offset 0.00
        Unidad - Create (((Hero level of Cazador de Demonios 0001 <gen>) / 7) + 1) Cazadora for Jugador 1 (rojo) at (Center of Entrenamiento de unidades <gen>) facing Vista edificio predeterminada degrees
        Grupo de unidad - Add all units of (Last created unit group) to Aliados
        Grupo de unidad - Pick every unit in Aliados and do (Actions)
            Bucle: Acciones
                Unidad - Order (Picked unit) to Atacar-mover a (Position of Zigurat Nerubian 0003 <gen>)


Muerte de enemigo
    Acontecimientos
        Unidad - A unit Muere
    Condiciones
        (Owner of (Triggering unit)) Igual a Jugador 12 (marrón)
    Acciones
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            Si: Condiciones
                (Random integer number between 1 and 15) Igual a 2
            Entonces: Acciones
                Set Pos = (Position of (Triggering unit))
                Objeto - Create Pergamino de |nRestauración at Pos
            Otros: Acciones


Muerte de heroe
    Acontecimientos
        Unidad - A unit Muere
    Condiciones
        (Triggering unit) Igual a Cazador de Demonios 0001 <gen>
    Acciones
        Partida - Display to (All players) the text: Tu heroe ha muerto,...
        Wait 5.00 seconds
        Héroe - Instantly revive Cazador de Demonios 0001 <gen> at (Center of Inicio <gen>), Mostrar revival graphics


AcercamientoFinal
    Acontecimientos
        Unidad - A unit enters Enemigos <gen>
        Unidad - A unit leaves Enemigos <gen>
    Condiciones
        (Owner of (Triggering unit)) Igual a Jugador 1 (rojo)
    Acciones
        Unidad - Create 2 Troll oscuro for Jugador 12 (marrón) at (Center of Enemigos <gen>) facing Vista edificio predeterminada degrees
        Grupo de unidad - Add all units of (Last created unit group) to Enemigos
        Grupo de unidad - Pick every unit in (Units owned by Jugador 12 (marrón)) and do (Actions)
            Bucle: Acciones
                Unidad - Order (Picked unit) to Atacar-mover a (Position of Cazador de Demonios 0001 <gen>)


Victoria
    Acontecimientos
        Unidad - Zigurat Nerubian 0003 <gen> Muere
    Condiciones
    Acciones
        Visibilidad - Create an initially Activado visibility modifier for Jugador 1 (rojo) emitting Visibilidad across (Playable map area)
        Visibilidad - Enable (Last created visibility modifier)
        Partida - Set the time of day to 8.00
        Escenario - Create at (Playable map area) the weather effect Rayos de Claro de Luna
        Partida - Display to (All players) the text: VICTORIA!!!!! Esper...
        Grupo de unidad - Pick every unit in (Units in (Playable map area) owned by Jugador 1 (rojo)) and do (Actions)
            Bucle: Acciones
                Set Pos = (Position of (Picked unit))
                Efecto especial - Create a special effect at Pos using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
                Efecto especial - Destroy (Last created special effect)
                Unidad - Remove (Picked unit) from the game
        Grupo de unidad - Pick every unit in (Units in (Playable map area) owned by Jugador 12 (marrón)) and do (Actions)
            Bucle: Acciones
                Set Pos = (Position of (Picked unit))
                Efecto especial - Create a special effect at Pos using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
                Efecto especial - Destroy (Last created special effect)
                Unidad - Kill (Picked unit)
        Wait 6.00 seconds
        Partida - Victory Jugador 1 (rojo) (Mostrar dialogs, Saltar scores)


Actividad
1. Hacer una lectura de los detonadores y tratar de interpretar las funciones de estos en el juego (pista: están en orden de funcionamiento).
2. Ajustar los detonadores con valores diferentes: que pasa si se cambian los valores numéricos? como se cambian?
3. Cambiar los modelos del heroe, del las tropas aliadas y enemigos y ver su efecto en el funcionamiento del mapa (si falla, ¿como corregirlo?)