| | Autor | Mensaje |
---|
Soldado
Barra de Salud : 
Mensajes : 81
Reputación : 0 Monedas de oro : 295 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: IA pelee cerca de aliado Vie Jun 12, 2020 4:04 am | |
| Hola de nuevo, hablando del tema anterior no sabía que ya había una acción para dividir oro xd, ok lo que vengo a pedir es un sistema para que el IA/Bot sólo pelee cerca de un heroe o creeps aliado. Intenté hacer un sistema pero provocaba muchos bug y decidí borrarlo, que alguien sepa me lo dice. Gracias. |
|  | | 

Barra de Salud : 
Mensajes : 3662
Reputación : 728 Monedas de oro : 11330 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: IA pelee cerca de aliado Vie Jun 12, 2020 10:33 pm | |
| Depende del mapa, te muestro un ejemplo aproximado de lo que pides: [gui]AI LOOP Acontecimientos Tiempo - Every 0.10 seconds of game time Condiciones Acciones Grupo de jugadores - Pick every player in AI_Force and do (Actions) Bucle: Acciones Set ID = (Player number of (Picked player)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Heroes[ID] is alive) Igual a (==) True Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones RONDA Igual a (==) -1 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitAction[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitAction[ID] = (AI_WaitAction[ID] - 0.10) Otros: Acciones Unidad - Order Heroes[ID] to Atacar-mover a (Center of RondaFinal ) Set AI_WaitAction[ID] = 10.00 Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_GAMEON Igual a (==) True Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitAction[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitAction[ID] = (AI_WaitAction[ID] - 0.10) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Vagoneta is on) Igual a (==) False Entonces: Acciones Set Punto2 = (Position of Heroes[ID]) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_ATTACKING[ID] Igual a (==) False Entonces: Acciones Set Punto = (Point(2500.00, -4000.00)) Otros: Acciones Set Punto = (Point(4100.00, -4200.00)) Unidad - Order Heroes[ID] to Mover a Punto Set AI_WaitAction[ID] = 0.50 Custom script: call RemoveLocation(udg_Punto) Custom script: call RemoveLocation(udg_Punto2) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitDecission[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitDecission[ID] = (AI_WaitDecission[ID] - 0.10) Detonador - Run AI ACTIONS (checking conditions) Otros: Acciones Set AI_PriorisizedUnit[ID] = Ninguna unidad Detonador - Run AI DECISION TREE (checking conditions) Otros: Acciones Otros: Acciones [/gui]
[gui]AI DECISION TREE Acontecimientos Condiciones Acciones Custom script: local real x Custom script: local real y Set Entero = (Point-value of Heroes[ID]) Set Punto = (Position of Heroes[ID]) Set Punto2 = (Position of Vagoneta) -------- AI_DECISION = 0 ==> Fase inicial del juego -------- -------- Los atacantes priorizan empezar a mover la carga -------- -------- Los defensores priorizan mantenerse juntos -------- -------- AI_DECISION = 1 ==> Pelear -------- -------- AI_DECISION = 2 ==> Reagrupar -------- -------- AI_DECISION = 3 ==> Retirada -------- -------- AI_DECISION = 4 ==> "Idle" -------- -------- ----------------------------------------------------------------- -------- -------- Valor de Punto: Lo uso para determinar el posicionamiento general del hà roe -------- -------- 1 = Frontline, prioriza capturar el objetivo -------- -------- 2 = Melà , prioriza el objetivo pero evita pelear contra los números -------- -------- 3 = Rango ofensivo, prioriza estar a rango máximo del enemigo más cercano -------- -------- 4 = Rango defensivo, prioriza usar sus hechizos sobre aliados -------- Set GrupoAtacante = (Units within 1200.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) True))) Set GrupoDefensor = (Units within 1200.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Grupo de unidad - Remove Heroes[ID] from GrupoDefensor Set Real = 999999.00 Set Real2 = 999999.00 Set Real3 = (Distance between Punto and Punto2) Grupo de unidad - Pick every unit in GrupoAtacante and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto2) Set EnemigoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real2 Entonces: Acciones Set Real2 = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Multiple ConditionsOr - Any (Conditions) are true Condiciones (Percentage life of Heroes[ID]) Menor que (<) 10.00 Multiple ConditionsAnd - All (Conditions) are true Condiciones (Number of units in GrupoDefensor) Menor que (<) 1 (Number of units in GrupoAtacante) Mayor que (>) 2 Entonces: Acciones Set AI_Decision[ID] = 3 Set AI_WaitDecission[ID] = 5.00 Otros: Acciones Custom script: call DestroyGroup(udg_GrupoAtacante) Custom script: call DestroyGroup(udg_GrupoDefensor) [/gui]
[gui]AI ACTIONS Acontecimientos Condiciones Acciones -------- AI_DECISION = 0 ==> Fase inicial del juego -------- -------- Los atacantes priorizan empezar a mover la carga -------- -------- Los defensores priorizan mantenerse juntos -------- -------- AI_DECISION = 1 ==> Pelear -------- -------- AI_DECISION = 2 ==> Reagrupar -------- -------- AI_DECISION = 3 ==> Retirada -------- -------- ----------------------------------------------------------------- -------- Custom script: local real x Custom script: local real y Set Entero = (Point-value of Heroes[ID]) -------- Valor de Punto: Lo uso para determinar el posicionamiento general del hà roe -------- -------- 1 = Frontline, prioriza capturar el objetivo -------- -------- 2 = Melà , prioriza el objetivo pero evita pelear contra los números -------- -------- 3 = Rango ofensivo, prioriza estar a rango máximo del enemigo más cercano -------- -------- 4 = Rango defensivo, prioriza usar sus hechizos sobre aliados -------- Set Punto = (Position of Heroes[ID]) Set Group = (Units within 400.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an ally of (Player(ID))) Igual a (==) True))) Set Unidad = Ninguna unidad Grupo de unidad - Pick every unit in Group and do (Actions) Bucle: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Vida of (Picked unit)) Menor que (<) 50.00 Entonces: Acciones Set Unidad = (Picked unit) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Unidad No igual a (!=) Ninguna unidad Entonces: Acciones Unidad - Order Heroes[ID] to Atacar Unidad Set AI_WaitAction[ID] = 3.00 Set Entero = 0 Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 0 Entonces: Acciones Set AI_WaitAction[ID] = 3.00 Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 1 Entonces: Acciones Set AI_WaitAction[ID] = 3.00 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 1 Entonces: Acciones Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_ATTACKING[ID] Igual a (==) True Entonces: Acciones Custom script: call IssueImmediateOrder(udg_Heroes[udg_ID], udg_AI_OrderMovil[udg_ID]) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "move", x,y) Otros: Acciones Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 2 Entonces: Acciones Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 3 Entonces: Acciones Set Punto = (Position of Heroes[ID]) Set Group = (Units within 750.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an ally of (Player(ID))) Igual a (==) False))) Set Real = 9999.00 Set Real2 = 220.00 Set TempInteger = 0 Grupo de unidad - Pick every unit in Group and do (Actions) Bucle: Acciones Set Punto2 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real2 Entonces: Acciones Set TempInteger = -1 Set Unidad = (Picked unit) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real Entonces: Acciones Set TempInteger = 1 Set Unidad = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto2) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones TempInteger Igual a (==) -1 Entonces: Acciones Set Punto2 = (Position of Unidad) Set Punto3 = (Punto offset by 256.00 towards (Angle from Punto to Punto2) degrees) Custom script: set x = GetLocationX(udg_Punto3) Custom script: set y = GetLocationY(udg_Punto3) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "move", x,y) Set AI_WaitAction[ID] = 1.75 Custom script: call RemoveLocation(udg_Punto2) Custom script: call RemoveLocation(udg_Punto3) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones TempInteger Igual a (==) 1 Entonces: Acciones Custom script: call IssueTargetOrder(udg_Heroes[udg_ID], "attackonce",udg_Unidad) Set AI_WaitAction[ID] = 1.00 Otros: Acciones Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 2 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 4 Entonces: Acciones Set GrupoDefensor = (Units within 3000.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Number of units in GrupoDefensor) Mayor que o igual a (>=) 1 Entonces: Acciones Set Real = 3333.00 Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Set AI_WaitAction[ID] = 5.00 Unidad - Order Heroes[ID] to Seguir AliadoCercano Otros: Acciones Otros: Acciones Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 3 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Menor que o igual a (<=) 2 Entonces: Acciones Set Punto3 = (CheckPoint[(CheckPoint_Actual + 6)] offset by (Random real number between 0.00 and 300.00) towards (Random angle) degrees) Unidad - Order Heroes[ID] to Mover a Punto3 Set AI_WaitAction[ID] = 0.50 Custom script: call RemoveLocation(udg_Punto3) Otros: Acciones Set GrupoDefensor = (Units within 3000.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Number of units in GrupoDefensor) Mayor que o igual a (>=) 1 Entonces: Acciones Set Real = 3333.00 Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Set AI_WaitAction[ID] = 5.00 Unidad - Order Heroes[ID] to Seguir AliadoCercano Otros: Acciones Otros: Acciones [/gui]
Lo que pides es un trabajo largo, y estoy dispuesto a ayudarte a armarlo, no estoy dispuesto a hacertelo |
|  | | Soldado
Barra de Salud : 
Mensajes : 81
Reputación : 0 Monedas de oro : 295 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: IA pelee cerca de aliado Sáb Jun 13, 2020 12:49 am | |
| - Marcos_M escribió:
- Depende del mapa, te muestro un ejemplo aproximado de lo que pides:
[gui]AI LOOP Acontecimientos Tiempo - Every 0.10 seconds of game time Condiciones Acciones Grupo de jugadores - Pick every player in AI_Force and do (Actions) Bucle: Acciones Set ID = (Player number of (Picked player)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Heroes[ID] is alive) Igual a (==) True Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones RONDA Igual a (==) -1 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitAction[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitAction[ID] = (AI_WaitAction[ID] - 0.10) Otros: Acciones Unidad - Order Heroes[ID] to Atacar-mover a (Center of RondaFinal ) Set AI_WaitAction[ID] = 10.00 Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_GAMEON Igual a (==) True Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitAction[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitAction[ID] = (AI_WaitAction[ID] - 0.10) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Vagoneta is on) Igual a (==) False Entonces: Acciones Set Punto2 = (Position of Heroes[ID]) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_ATTACKING[ID] Igual a (==) False Entonces: Acciones Set Punto = (Point(2500.00, -4000.00)) Otros: Acciones Set Punto = (Point(4100.00, -4200.00)) Unidad - Order Heroes[ID] to Mover a Punto Set AI_WaitAction[ID] = 0.50 Custom script: call RemoveLocation(udg_Punto) Custom script: call RemoveLocation(udg_Punto2) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_WaitDecission[ID] Mayor que o igual a (>=) 0.01 Entonces: Acciones Set AI_WaitDecission[ID] = (AI_WaitDecission[ID] - 0.10) Detonador - Run AI ACTIONS (checking conditions) Otros: Acciones Set AI_PriorisizedUnit[ID] = Ninguna unidad Detonador - Run AI DECISION TREE (checking conditions) Otros: Acciones Otros: Acciones [/gui]
[gui]AI DECISION TREE Acontecimientos Condiciones Acciones Custom script: local real x Custom script: local real y Set Entero = (Point-value of Heroes[ID]) Set Punto = (Position of Heroes[ID]) Set Punto2 = (Position of Vagoneta) -------- AI_DECISION = 0 ==> Fase inicial del juego -------- -------- Los atacantes priorizan empezar a mover la carga -------- -------- Los defensores priorizan mantenerse juntos -------- -------- AI_DECISION = 1 ==> Pelear -------- -------- AI_DECISION = 2 ==> Reagrupar -------- -------- AI_DECISION = 3 ==> Retirada -------- -------- AI_DECISION = 4 ==> "Idle" -------- -------- ----------------------------------------------------------------- -------- -------- Valor de Punto: Lo uso para determinar el posicionamiento general del hà roe -------- -------- 1 = Frontline, prioriza capturar el objetivo -------- -------- 2 = Melà , prioriza el objetivo pero evita pelear contra los números -------- -------- 3 = Rango ofensivo, prioriza estar a rango máximo del enemigo más cercano -------- -------- 4 = Rango defensivo, prioriza usar sus hechizos sobre aliados -------- Set GrupoAtacante = (Units within 1200.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) True))) Set GrupoDefensor = (Units within 1200.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Grupo de unidad - Remove Heroes[ID] from GrupoDefensor Set Real = 999999.00 Set Real2 = 999999.00 Set Real3 = (Distance between Punto and Punto2) Grupo de unidad - Pick every unit in GrupoAtacante and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto2) Set EnemigoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real2 Entonces: Acciones Set Real2 = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Multiple ConditionsOr - Any (Conditions) are true Condiciones (Percentage life of Heroes[ID]) Menor que (<) 10.00 Multiple ConditionsAnd - All (Conditions) are true Condiciones (Number of units in GrupoDefensor) Menor que (<) 1 (Number of units in GrupoAtacante) Mayor que (>) 2 Entonces: Acciones Set AI_Decision[ID] = 3 Set AI_WaitDecission[ID] = 5.00 Otros: Acciones Custom script: call DestroyGroup(udg_GrupoAtacante) Custom script: call DestroyGroup(udg_GrupoDefensor) [/gui]
[gui]AI ACTIONS Acontecimientos Condiciones Acciones -------- AI_DECISION = 0 ==> Fase inicial del juego -------- -------- Los atacantes priorizan empezar a mover la carga -------- -------- Los defensores priorizan mantenerse juntos -------- -------- AI_DECISION = 1 ==> Pelear -------- -------- AI_DECISION = 2 ==> Reagrupar -------- -------- AI_DECISION = 3 ==> Retirada -------- -------- ----------------------------------------------------------------- -------- Custom script: local real x Custom script: local real y Set Entero = (Point-value of Heroes[ID]) -------- Valor de Punto: Lo uso para determinar el posicionamiento general del hà roe -------- -------- 1 = Frontline, prioriza capturar el objetivo -------- -------- 2 = Melà , prioriza el objetivo pero evita pelear contra los números -------- -------- 3 = Rango ofensivo, prioriza estar a rango máximo del enemigo más cercano -------- -------- 4 = Rango defensivo, prioriza usar sus hechizos sobre aliados -------- Set Punto = (Position of Heroes[ID]) Set Group = (Units within 400.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an ally of (Player(ID))) Igual a (==) True))) Set Unidad = Ninguna unidad Grupo de unidad - Pick every unit in Group and do (Actions) Bucle: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Vida of (Picked unit)) Menor que (<) 50.00 Entonces: Acciones Set Unidad = (Picked unit) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Unidad No igual a (!=) Ninguna unidad Entonces: Acciones Unidad - Order Heroes[ID] to Atacar Unidad Set AI_WaitAction[ID] = 3.00 Set Entero = 0 Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 0 Entonces: Acciones Set AI_WaitAction[ID] = 3.00 Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 1 Entonces: Acciones Set AI_WaitAction[ID] = 3.00 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 1 Entonces: Acciones Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_ATTACKING[ID] Igual a (==) True Entonces: Acciones Custom script: call IssueImmediateOrder(udg_Heroes[udg_ID], udg_AI_OrderMovil[udg_ID]) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "move", x,y) Otros: Acciones Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 2 Entonces: Acciones Set Punto = (Position of Vagoneta) Custom script: set x = GetLocationX(udg_Punto) Custom script: set y = GetLocationY(udg_Punto) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "attack", x,y) Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 3 Entonces: Acciones Set Punto = (Position of Heroes[ID]) Set Group = (Units within 750.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an ally of (Player(ID))) Igual a (==) False))) Set Real = 9999.00 Set Real2 = 220.00 Set TempInteger = 0 Grupo de unidad - Pick every unit in Group and do (Actions) Bucle: Acciones Set Punto2 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real2 Entonces: Acciones Set TempInteger = -1 Set Unidad = (Picked unit) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto2) Menor que (<) Real Entonces: Acciones Set TempInteger = 1 Set Unidad = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto2) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones TempInteger Igual a (==) -1 Entonces: Acciones Set Punto2 = (Position of Unidad) Set Punto3 = (Punto offset by 256.00 towards (Angle from Punto to Punto2) degrees) Custom script: set x = GetLocationX(udg_Punto3) Custom script: set y = GetLocationY(udg_Punto3) Custom script: call IssuePointOrder(udg_Heroes[udg_ID], "move", x,y) Set AI_WaitAction[ID] = 1.75 Custom script: call RemoveLocation(udg_Punto2) Custom script: call RemoveLocation(udg_Punto3) Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones TempInteger Igual a (==) 1 Entonces: Acciones Custom script: call IssueTargetOrder(udg_Heroes[udg_ID], "attackonce",udg_Unidad) Set AI_WaitAction[ID] = 1.00 Otros: Acciones Custom script: call RemoveLocation(udg_Punto) Otros: Acciones Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 2 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Igual a (==) 4 Entonces: Acciones Set GrupoDefensor = (Units within 3000.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Number of units in GrupoDefensor) Mayor que o igual a (>=) 1 Entonces: Acciones Set Real = 3333.00 Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Set AI_WaitAction[ID] = 5.00 Unidad - Order Heroes[ID] to Seguir AliadoCercano Otros: Acciones Otros: Acciones Otros: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones AI_Decision[ID] Igual a (==) 3 Entonces: Acciones Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones Entero Menor que o igual a (<=) 2 Entonces: Acciones Set Punto3 = (CheckPoint[(CheckPoint_Actual + 6)] offset by (Random real number between 0.00 and 300.00) towards (Random angle) degrees) Unidad - Order Heroes[ID] to Mover a Punto3 Set AI_WaitAction[ID] = 0.50 Custom script: call RemoveLocation(udg_Punto3) Otros: Acciones Set GrupoDefensor = (Units within 3000.00 of Punto matching ((((Matching unit) is Un hà roe) Igual a (==) True) and (((Matching unit) belongs to an enemy of (Player(ID))) Igual a (==) False))) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Number of units in GrupoDefensor) Mayor que o igual a (>=) 1 Entonces: Acciones Set Real = 3333.00 Grupo de unidad - Pick every unit in GrupoDefensor and do (Actions) Bucle: Acciones Set Punto3 = (Position of (Picked unit)) Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions) Si: Condiciones (Distance between Punto and Punto3) Menor que (<) Real Entonces: Acciones Set Real = (Distance between Punto and Punto3) Set AliadoCercano = (Picked unit) Otros: Acciones Custom script: call RemoveLocation(udg_Punto3) Set AI_WaitAction[ID] = 5.00 Unidad - Order Heroes[ID] to Seguir AliadoCercano Otros: Acciones Otros: Acciones [/gui]
Lo que pides es un trabajo largo, y estoy dispuesto a ayudarte a armarlo, no estoy dispuesto a hacertelo Si claro te entiendo pero gracias lo probare. |
|  | |
 | (#) Tema: Re: IA pelee cerca de aliado  | |
| |
|  | | |
Temas similares |  |
|
| Permisos de este foro: | No puedes responder a temas en este foro.
| |
| |
| Eventos Actuales |
No hay eventos actualmente
|
Últimos temas | » Battle Arena v2.7 AI Mode Ayer a las 11:00 pm por Toxanathos» Pozo primaveral con las razas especiales (Mapa) Ayer a las 6:01 pm por Maty» La Caída Del Rey Exánime - 2016 Lun Mayo 16, 2022 11:55 pm por vics» Sistema de dificultad Dom Mayo 15, 2022 7:06 pm por Marcos_M» Batalla de Xia Pi (ejército de Lu Bu) (mapa en ingles) Mar Mayo 10, 2022 4:38 am por tobdeg» Pack de armas Warhammer 40k Mar Mayo 10, 2022 4:32 am por tobdeg» Crear modelos Lun Mayo 09, 2022 3:00 pm por Rhawk_94» Oleadas de creeps Sáb Mayo 07, 2022 12:02 pm por Marcos_M» velocidad de animación Sáb Mayo 07, 2022 12:02 pm por Marcos_M» Stealth Item Jue Mayo 05, 2022 2:06 am por Becientodos» [DUDA] Modificar textos de la habilidad para aprender poderes de heroe Miér Mayo 04, 2022 2:47 am por WrathfulSteel» [KE].SYS - Oro/Madera en Casas cada X seg. Lun Mayo 02, 2022 4:58 pm por Faceless5» Dash v1.4 [GUI] - By ArOn Lun Mayo 02, 2022 8:24 am por AdanPirss» [GUÍA] Colores en los textos • Lun Mayo 02, 2022 6:32 am por AdanPirss» Crea tu propio spell [Rayos] Dom Mayo 01, 2022 2:56 pm por TheMaverickMc |
Los posteadores más activos de la semana | |
¿Quién está en línea? | En total hay 9 usuarios en línea: 0 Registrados, 0 Ocultos y 9 Invitados :: 1 Motor de búsqueda Ninguno El record de usuarios en línea fue de 341 durante el Lun Nov 04, 2019 3:14 pm |
|