|
Autor | Mensaje |
---|
Capitán

Barra de Salud : 
Mensajes : 134
Reputación : 5 Monedas de oro : 448 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Expliquenme el Matching Dom Nov 01, 2020 3:45 am | |
| Cual es la diferencia entre estos?, segun yo ambos deberian funcionar de la misma forma no? ya que el matching player esta refiriendose a todos los jugadores o no?
[gui]Shipyard return1 Events Conditions Actions Set Shipyard_Loc_1[1] = (Position of (Triggering unit)) Set Shipyard_Group_1[1] = (Units within (Shipyard_Real[1] + 25.00) of Shipyard_Loc_1[1] matching ((Owner of (Matching unit)) Equal to Player 1 (Red))) [/gui]
[gui]Shipyard return1 Events Conditions Actions Set Shipyard_Loc_1[1] = (Position of (Triggering unit)) Set Shipyard_Group_1[1] = (Units within (Shipyard_Real[1] + 25.00) of Shipyard_Loc_1[1] matching ((Owner of (Matching unit)) Equal to (Matching player))) [/gui]
El detonador original es este
[gui]Shipyard wea Events Map initialization Conditions Actions Set Shipyard_Real[1] = 200.00 Set Shipyard[1] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Shipyard)) Unit Group - Pick every unit in Shipyard[1] and do (Actions) Loop - Actions Trigger - Add to Shipyard return1 the event (Unit - A unit comes within Shipyard_Real[1] of (Picked unit)) [/gui]
[gui]Shipyard return1 Events Conditions Actions Set Shipyard_Loc_1[1] = (Position of (Triggering unit)) Set Shipyard_Group_1[1] = (Units within (Shipyard_Real[1] + 25.00) of Shipyard_Loc_1[1] matching ((Owner of (Matching unit)) Equal to Player 1 (Red))) Unit Group - Pick every unit in Shipyard_Group_1[1] and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Mana of (Picked unit)) Equal to 10.00 (Unit-type of (Picked unit)) Equal to Transport Ship Then - Actions Player - Add 2 to (Owner of (Picked unit)) Current gold Unit - Set mana of (Picked unit) to 0.00 Else - Actions Do nothing Custom script: call DestroyGroup(udg_Shipyard_Group_1[1]) Custom script: call RemoveLocation(udg_Shipyard_Loc_1[1]) [/gui] |
|
 | |


Barra de Salud : 
Mensajes : 3665
Reputación : 733 Monedas de oro : 11250 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Dom Nov 01, 2020 12:08 pm | |
| "Matching" se usa exclusivamente en los filtros. Matching Player es para filtros de grupos de jugadores y Matching Unit es para filtros de grupos de unidades, son 2 cosas diferentes y no los deberías juntar. Quizás buscas "Owner of (Matching unit)" y eso es lo que pretendes que matching player sea
Matching player no se refiere a todos los jugadores, se refiere al jugador que el filtro tenga en cuenta en el momento del filtro de grupo de jugadores.
Matching unit es lo mismo.
Los filtros pasan por varios jugadores/unidades y por eso es como "si se refiriera a todos los jugadores" |
|
 | |
Capitán

Barra de Salud : 
Mensajes : 134
Reputación : 5 Monedas de oro : 448 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Dom Nov 01, 2020 6:24 pm | |
| Osea tendria que usar algo asi masomenos?
[gui] Unit Group - Pick every unit in (Units owned by (Owner of (Picked unit)) matching ((Owner of (Matching unit)) Equal to (Matching player))) and do (Actions) Loop - Actions [/gui] |
|
 | |


Barra de Salud : 
Mensajes : 3665
Reputación : 733 Monedas de oro : 11250 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 1:02 pm | |
| Pues estás usando matching player cuando te dije que no funciona ahí |
|
 | |
Capitán

Barra de Salud : 
Mensajes : 134
Reputación : 5 Monedas de oro : 448 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 9:50 pm | |
| Okey ya lo entendi masomenos ahora estoy usando esto y funciona [gui]Set Shipyard_Group_1[1] = (Units within (Shipyard_Real[1] + 25.00) of Shipyard_Loc_1[1] matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))) [/gui] La cosa es q como condiciono para que no funcione con los enemigos? Intente usar esto pero luego me di cuenta que la unidad a la que se refiere es la que entra en el rango, no a la base que hay que acercarse  [gui]((picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to False [/gui] |
|
 | |
Iniciado

Barra de Salud : 
Mensajes : 6
Reputación : 3 Monedas de oro : 15 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 10:10 pm | |
| Intenta con esto
[gui]Set Shipyard_Group_1[1] = (Units within (Shipyard_Real[1] + 25.00) of Shipyard_Loc_1[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Igual a False)) [/gui] |
|
 | |
Capitán

Barra de Salud : 
Mensajes : 134
Reputación : 5 Monedas de oro : 448 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 10:44 pm | |
| Es justo lo que dije arriba,
la unidad que entro en rango es enemigo del que controla a la unidad que entro en rango = falso
osea sigue en bucle
Necesito algo que separe a la unidad que entra en rango y a la unidad a la que hay que acercarse
algo asi, la unidad que entra en rango es enemigo de la unidad a la que hay que acercarse = true |
|
 | |
Iniciado

Barra de Salud : 
Mensajes : 6
Reputación : 3 Monedas de oro : 15 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 11:05 pm | |
| Quizás no estoy entendiendo.
Lo que necesitas es que cuando una unidad aliada entre en el rango del edificio le agregue oro al dueño de esa unidad, cierto?
Y en caso de que sea una unidad enemiga simplemente no ocurra nada? |
|
 | |
Capitán

Barra de Salud : 
Mensajes : 134
Reputación : 5 Monedas de oro : 448 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 11:20 pm | |
| Exacto!!! justo eso, lo hice para cada jugador pero son 10 detonadores y aparte son 4 edificos diferentes asi que serian 40 y me dio flojera  asi que vine para ver si me podrian ayudar a hacer con todos los jugadores a la vez asi solo hago 4 detonadores |
|
 | |
Iniciado

Barra de Salud : 
Mensajes : 6
Reputación : 3 Monedas de oro : 15 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Lun Nov 02, 2020 11:52 pm | |
| Ya entendí el problema, lo que pasa es que al momento de tomar la unidad "Triggering unit" el detonador está devolviendo la unidad que entra al área, no el edificio de destino, por esto es que no funciona de la manera correcta.
Has intentado hacerlo con un evento de tiempo periódico con el que detectes cada cierto tiempo si hay una unidad de X tipo dentro del área del edificio? Sería mucho más fácil |
|
 | |
Soldado

Barra de Salud : 
Mensajes : 95
Reputación : 7 Monedas de oro : 317 Monedas de Platino : 0 
Inventario :  
 | (#) Tema: Re: Expliquenme el Matching Dom Jun 20, 2021 9:16 am | |
| - Lordarkangel escribió:
- Exacto!!! justo eso,
lo hice para cada jugador pero son 10 detonadores y aparte son 4 edificos diferentes asi que serian 40 y me dio flojera asi que vine para ver si me podrian ayudar a hacer con todos los jugadores a la vez asi solo hago 4 detonadores Prueba y comenta: https://www.epicwar.com/maps/319192/ Desconosco si es la mejor forma de hacerlo, puesto que entran en 2 constantes verificaciones de grupos de unidades para darte los valores necesarios y usarlos en los ancontecimientos para usarlos en los triggering units. Posiblemente requiera de una limpieza de leaks de memoria en los grupos de unidades generados constantemente (lo agrege).  No.  |
|
 | |
 | (#) Tema: Re: Expliquenme el Matching  | |
| |
|
 | |
|