• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hero selection - Dialog Button

Status
Not open for further replies.
Level 2
Joined
Dec 7, 2010
Messages
16
Hi, im creating a hero selection by using dialog,

my 1° soldier is caled "Bob" and when i hit the 3°kill, i want to show a dialog with 3 buttons, (warior,archer and mage) to select and change "Bob" to a better character

Im using:

---- Bob creation for 2 players----

  • Creacion de bob
    • Acontecimientos
      • Map initialization
    • Condiciones
    • Acciones
      • Unidad - Create 1 Bob for Jugador 1 (rojo) at (Center of Spawn Rojo <gen>) facing Vista edificio predeterminada degrees
      • Unidad - Create 1 Bob for Jugador 2 (azul) at (Center of Spawn Azul <gen>) facing Vista edificio predeterminada degrees
------Setting the heroes------

  • Melee Initialization
    • Acontecimientos
      • Map initialization
    • Condiciones
    • Acciones
      • -------- Preparing Hero List --------
      • Set Heroes[1] = Guerrero
      • Set Heroes[2] = Arquero
      • Set Heroes[3] = Mago
------A kills leaderboard-----

  • Crear tabla de kills
    • Acontecimientos
      • Tiempo - Elapsed game time is 1.00 seconds
    • Condiciones
    • Acciones
      • Tabla de lÃ*deres - Create a leaderboard for (All players) titled Tabla de kills
      • Grupo de jugadores - Pick every player in (All players) and do (Actions)
        • Bucle: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • ((Picked player) controller) Igual a Usuario
            • Entonces: Acciones
              • Tabla de lÃ*deres - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
            • Otros: Acciones
      • Tabla de lÃ*deres - Mostrar (Last created leaderboard)
------Red counter for the table-------

  • Contador de kills ROJO
    • Acontecimientos
      • Unidad - A unit Muere
    • Condiciones
      • ((Killing unit) belongs to an ally of Jugador 1 (rojo)) Igual a True
    • Acciones
      • Set Player_Kills_Real[(Player number of (Owner of (Killing unit)))] = (Player_Kills_Real[(Player number of (Owner of (Killing unit)))] + 1.00)
      • Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Tabla de lÃ*deres - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills[(Player number of (Owner of (Killing unit)))]
      • Tabla de lÃ*deres - Sort (Last created leaderboard) by Valor in Descendiente order
-------Dialog for the character change 1-------

  • Primer cambio de clases
    • Acontecimientos
      • Unidad - A unit Muere
    • Condiciones
      • And - All (Conditions) are true
        • Condiciones
          • ((Killing unit) belongs to an ally of Jugador 1 (rojo)) Igual a True
          • (Unit-type of (Killing unit)) Igual a Bob
          • Player_Kills[(Player number of (Owner of (Killing unit)))] Igual a 3
    • Acciones
      • Unidad - Remove (Killing unit) from the game
      • -------- Setup for Dialog 1 --------
      • Diálogo - Clear HeroDialog1
      • Diálogo - Change the title of HeroDialog1 to Choose a Hero
      • Diálogo - Create a dialog button for HeroDialog1 labelled Guerrero
      • Set DialogButtons[1] = (Last created dialog Button)
      • Diálogo - Create a dialog button for HeroDialog1 labelled Arquera
      • Set DialogButtons[2] = (Last created dialog Button)
      • Diálogo - Create a dialog button for HeroDialog1 labelled Mago
      • Set DialogButtons[3] = (Last created dialog Button)
      • -------- Showing the dialog to all players --------
      • Grupo de jugadores - Pick every player in (All players controlled by a Usuario player) and do (Actions)
        • Bucle: Acciones
          • Diálogo - Mostrar HeroDialog1 for (Picked player)
-------2dialog (create the unit selected)------

  • DoDialog
    • Acontecimientos
      • Diálogo - A dialog button is clicked for HeroDialog1
      • Diálogo - A dialog button is clicked for HeroDialog2
    • Condiciones
    • Acciones
      • For each (Integer A) from 1 to 3, do (Actions)
        • Bucle: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • (Clicked dialog button) Igual a DialogButtons[(Integer A)]
            • Entonces: Acciones
              • Cámara - Pan camera for Jugador 1 (rojo) to (Center of Spawn Rojo <gen>) over 0.00 seconds
              • Unidad - Create 1 Heroes[(Integer A)] for (Triggering player) at ((Triggering player) start location) facing Vista edificio predeterminada degrees
              • Selección - Select (Last created unit) for (Triggering player)
              • Partida - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
            • Otros: Acciones
My problem is when i (player red) kill the last enemy with My bob, i see the dialog to change my class, but the Blue Too! please i really need help :)

(im using the same triggers for the blue, i just change the player1 to player2(blue)

Thanx
 
Status
Not open for further replies.
Top