• 🏆 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!

[General] Duel System Help

Status
Not open for further replies.
Level 5
Joined
Jul 31, 2011
Messages
103
I edited the system and this i what i have:

*-*


Duelo_Retador= is the player that use the duel (duelo) spell
Duelo_retado = is the player that is target with the duel spell
Duelo_Posicion = is the position of the units
SistemaDuelo= is the dialog window of accept or reject the duel
SistemaDueloSI = Button to accept the duel
SistemaDueloNO = Button to reject the duel
Duelo_Jugador_Retador = Owner of the casting unit
Duelo_Jugador_Retado= Owner of the target unit
*-*

  • Create Dialog Buttons
    • Events
      • Unit - A unit start the effect of an ability
      • Condiciones
        • (Ability being cast) Igual a Duelo (|cffffcc00E|r)
      • Acciones
        • -------- Challenger = retador --------
        • Set Duelo_Retador[(Player number of (Owner of (Casting unit)))] = (Casting unit)
        • Set Duelo_Jugador_Retador = (Owner of (Casting unit))
        • Set Duelo_Posicion[1] = (Position of Duelo_Retador[(Player number of (Owner of (Casting unit)))])
        • -------- Challenged = retado --------
        • Set Duelo_Retado[(Player number of (Owner of (Target unit of ability being cast)))] = (Target unit of ability being cast)
        • Set Duelo_Jugador_Retado = (Owner of (Target unit of ability being cast))
        • Set Duelo_Posicion[2] = (Position of Duelo_Retado[(Player number of (Owner of (Target unit of ability being cast)))])
        • Dialoge - Change the title of SistemaDuelo to ((Name of (Owner of Duelo_Retador[(Player number of (Triggering player))])) + Te ha retado a un duelo)
        • Dialoge - Create a dialog button for SistemaDuelo labelled Aceptar
        • Set SistemaDueloSI = (Last created dialog Button)
        • Dialoge - Create a dialog button for SistemaDuelo labelled Rechazar
        • Set SistemaDueloNo = (Last created dialog Button)
        • Dialoge - show SistemaDuelo for (Owner of Duelo_Retador[(Player number of (Triggering player))])
*-*
Duelo_Posicion[1]= Position of the challenger(casting, Retador)
Duelo_Posicion[2]= Position of the challenged(target, retado)
Duelo_Time = Timer to start the duel
Duelo_ACtivo= For check if the unit died in a duel


  • Duel Accepted
    • Events
      • Dialog - A dialog button is clicked for SistemaDuelo
    • Conditions
      • (Clicked dialog button) Igual a SistemaDueloSI
    • Actions
      • -------- Challenger = retador --------
      • Unit - pause Duelo_Retador[(Player number of Duelo_Jugador_Retador)]
      • -------- Challenged = retado --------
      • Unit- pause Duelo_Retado[(Player number of (Triggering player))]
      • Player- Make Duelo_Jugador_Retador treat Duelo_Jugador_Retado as an Enemy
      • -------- Challenger = retador --------
      • Unit - Move Duelo_Retador[(Player number of Duelo_Jugador_Retador)] instantly to Duelo_Punto[1]
      • -------- Challenged = retado --------
      • Unit - Move Duelo_Retado[(Player number of Duelo_Jugador_Retado)] instantly to Duelo_Punto[2]
      • Timer - Start Duelo_Timer as a Un tiro timer that will expire in 15.00 seconds
      • Timer - Create a timer window for (Last started timer) with title El Duelo empieza en:
      • -------- Challenger = retador --------
      • Timer - Mostrar (Last created timer window) for Duelo_Jugador_Retador
      • -------- Challenged = retado --------
      • Timer - Mostrar (Last created timer window) for Duelo_Jugador_Retado
      • Set Duelo_Activo[(Player number of Duelo_Jugador_Retador)] = 1
      • Set Duelo_Activo[(Player number of Duelo_Jugador_Retado)] = 1
      • Trriger - Run Duelo Contador <gen> (checking conditions)

  • Duel timer
    • event
      • Timer - Duel_Time expires
    • Condition
    • Action
      • Game - Display to (All players) the text: DUEL START
      • -------- Challenger = retador --------
      • Unit - unpause Duelo_Retador[(Player number of Duelo_Jugador_Retador)]
      • -------- Challenged = retado --------
      • Unit - unpause Duelo_Retado[(Player number of (Triggering player))]
      • Trigger - Turn on Duel Die <gen>
  • Duel Die
    • Event
      • Unit - A unit Die
    • Condition
    • Action
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop: Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If: Conditioon
              • Duelo_Activo[(Integer A)] Igual a 1
            • then: Action
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Yes: Condition
                  • (Owner of (Dying unit)) Igual a Duelo_Jugador_Retador
                • then: Action
                  • Gane - Display to (All players) the text: CHALLENGER WIN
                  • Unit- Move Duelo_Retador[(Player number of (Owner of (Killing unit)))] instantly to Duelo_Punto[1]
                • else: Action
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Yes: Condition
                      • (Owner of (Dying unit)) Igual a Duelo_Jugador_Retado
                      • then: Action
                        • Game - Display to (All players) the text: CHALLENGED WIN
                      • else: Action
                        • Unit - Move Duelo_Retado[(Player number of (Owner of (Killing unit)))] instantly to Duelo_Punto[2]
            • else: Action
              • trigger- Turn off (This trigger)
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
Making the buttons appear will be complicated. However, the "player challenges player" mechanic is easy. You will just have to make use of the Player - Set Alliance function:
  • Player - Make SomePlayer treat OtherPlayer as an Enemy
"Enemy" has a drop down menu that also includes:
  • Enemy with shared vision
  • Neutral
  • Neutral with shared vision
  • Ally
  • Ally with shared vision
  • Ally with shared vision and shared units
  • Ally with shared vision and full shared units
I'm not entirely sure how to make the buttons appear, but the use of the chat event will be a lot easier to implement.
 
Level 5
Joined
Jul 31, 2011
Messages
103
thanks, i will create the system and will post it, i see the spell duel system in naruto map (dota style) , i dont remember the name of the map but the load screen was hitachi i think or sasuke
 
Level 5
Joined
Jul 31, 2011
Messages
103
i fixed that in another trigger but i dont publish that trigger xD thanks for the help
 
Status
Not open for further replies.
Top