Foro especializado en Warcraft III y su editor
 
BuscarEntrar al ChatboxPortal del foroÍndiceSpellsRegistrarseConectarse
Eventos Actuales
No hay eventos actualmente
¡ Bienvenido Invitado !

Editar Perfil

Tus temas
Tus Mensajes ()

Enlaces rápidos








Comparte
 

 [Ayudenme] Leaderbord contador

Ver el tema anterior Ver el tema siguiente Ir abajo 
AutorMensaje
Lordarkangel
Soldado
Lordarkangel


Barra de Salud : Su salud está al 100% - Este usuario no ha recibido infracciones

Mensajes Mensajes : 102
Reputación Reputación : 4
Monedas de oro : 348
Monedas de Platino : 0 [Ayudenme] Leaderbord contador Empty

Inventario :
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10

[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10Jue Ago 13, 2020 10:16 am

El mapa es un Risk donde controlas granjas y fabricas

[gui]Leaderboard Setup
   Events
       Time - Elapsed game time is 1.00 seconds
   Conditions
   Actions
       Leaderboard - Create a leaderboard for (All players) titled Farm and Factories
       Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0)
       Leaderboard - Show (Last created leaderboard)
[/gui]

[gui]Farm Counter
   Events
       Unit - A unit Changes owner
   Conditions
   Actions
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           If - Conditions
               (Unit-type of (Ownership-changed unit)) Equal to Farm (0)
           Then - Actions
               Set Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))] = (Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))] + 1)
               Leaderboard - Sort (Last created leaderboard) by Value in Descending order
               Leaderboard - Change the value for (Player((Number of living Farm (0) units owned by (Owner of (Ownership-changed unit))))) in (Last created leaderboard) to Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))]
           Else - Actions
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           If - Conditions
               (Unit-type of (Ownership-changed unit)) Equal to Farm (1)
           Then - Actions
               Set Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))] = (Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))] + 1)
               Leaderboard - Sort (Last created leaderboard) by Value in Descending order
               Leaderboard - Change the value for (Player((Number of living Farm (0) units owned by (Owner of (Ownership-changed unit))))) in (Last created leaderboard) to Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))]
           Else - Actions
[/gui]
Volver arriba Ir abajo
Marcos_M

Marcos_M


Barra de Salud : Su salud está al 100% - Este usuario no ha recibido infracciones

Mensajes Mensajes : 3541
Reputación Reputación : 676
Monedas de oro : 11067
Monedas de Platino : 0 [Ayudenme] Leaderbord contador Empty

Inventario :
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10

[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: Re: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10Jue Ago 13, 2020 12:05 pm

sabes lo que esto significa?

[gui]Farm[(Number of living Farm (0) units owned by (Owner of (Ownership-changed unit)))][/gui]
Volver arriba Ir abajo
Lordarkangel
Soldado
Lordarkangel


Barra de Salud : Su salud está al 100% - Este usuario no ha recibido infracciones

Mensajes Mensajes : 102
Reputación Reputación : 4
Monedas de oro : 348
Monedas de Platino : 0 [Ayudenme] Leaderbord contador Empty

Inventario :
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10

[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: Re: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10Jue Ago 13, 2020 1:02 pm

Numero de -granjas- vivas que pertenecen al jugador de la unidad que cambio de bando

Bueno hice esto tambien pero aveces cuando la unidad cambia de bando no me lo cuenta

[gui]Farm Counter
Events
Unit - A unit Changes owner
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Ownership-changed unit)) Equal to Farm (0)
Then - Actions
Unit Group - Pick every unit in (Units of type Farm (0)) and do (Actions)
Loop - Actions
Set Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))] = (Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))] + 1)
Leaderboard - Sort (Last created leaderboard) by Value in Descending order
Leaderboard - Change the value for (Player((Number of living Farm (0) units owned by (Owner of (Picked unit))))) in (Last created leaderboard) to Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))]
Else - Actions
[/gui]
Volver arriba Ir abajo
Marcos_M

Marcos_M


Barra de Salud : Su salud está al 100% - Este usuario no ha recibido infracciones

Mensajes Mensajes : 3541
Reputación Reputación : 676
Monedas de oro : 11067
Monedas de Platino : 0 [Ayudenme] Leaderbord contador Empty

Inventario :
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10

[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: Re: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10Jue Ago 13, 2020 6:20 pm

@Lordarkangel escribió:
Numero de -granjas- vivas que pertenecen al jugador de la unidad que cambio de bando

Bueno hice esto tambien pero aveces cuando la unidad cambia de bando no me lo cuenta

[gui]Farm Counter
   Events
       Unit - A unit Changes owner
   Conditions
   Actions
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           If - Conditions
               (Unit-type of (Ownership-changed unit)) Equal to Farm (0)
           Then - Actions
               Unit Group - Pick every unit in (Units of type Farm (0)) and do (Actions)
                   Loop - Actions
                       Set Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))] = (Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))] + 1)
                       Leaderboard - Sort (Last created leaderboard) by Value in Descending order
                       Leaderboard - Change the value for (Player((Number of living Farm (0) units owned by (Owner of (Picked unit))))) in (Last created leaderboard) to Farm[(Number of living Farm (0) units owned by (Owner of (Picked unit)))]
           Else - Actions
[/gui]

Pues en realidad lo que dice ahí es "Granjas[SLOT VARIABLE] = Granjas[SLOT VARIABLE] + 1"

Realmente no funciona como vos esperas que funciona, porque dentro del corchete, tienes que poner un número que vos sepas cual es en todo momento(como el número id de un jugador), pues no entiendo que buscas, pero yo lo haría así:

[gui]Detonador sin nombre 001
Acontecimientos
Tiempo - Every 2.00 seconds of game time
Condiciones
Acciones
For each (Integer A) from 1 to 10, do (Actions)
Bucle: Acciones
Set GrupoGranjas = (Units owned by (Player((Integer A))) of type Granja)
Set Farms[(Integer A)] = (Number of units in GrupoGranjas)
Tabla de líderes - Change the value for (Player((Integer A))) in (Last created leaderboard) to Farms[(Integer A)]
Tabla de líderes - Sort (Last created leaderboard) by Valor in Descendiente order
Custom script: call DestroyGroup(udg_GrupoGranjas)
[/gui]
Esto se actualizaría cada 2 segundos y es corto y simple de entender
Volver arriba Ir abajo
Lordarkangel
Soldado
Lordarkangel


Barra de Salud : Su salud está al 100% - Este usuario no ha recibido infracciones

Mensajes Mensajes : 102
Reputación Reputación : 4
Monedas de oro : 348
Monedas de Platino : 0 [Ayudenme] Leaderbord contador Empty

Inventario :
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10
[Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10 [Ayudenme] Leaderbord contador Empysl10

[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: Re: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10Vie Ago 14, 2020 1:04 pm

Gracias, funciona perfecto

[gui]Farm Counter
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set FarmA[1] = (Units owned by (Player((Integer A))) of type Farm (0))
Set FarmA[2] = (Units owned by (Player((Integer A))) of type Farm (1))
Set Farm[(Integer A)] = ((Number of units in FarmA[1]) + (Number of units in FarmA[2]))
Leaderboard - Change the value for (Player((Integer A))) in (Last created leaderboard) to Farm[(Integer A)]
Leaderboard - Sort (Last created leaderboard) by Value in Descending order
[/gui]
Volver arriba Ir abajo
Contenido patrocinado




[Ayudenme] Leaderbord contador Empty
Mensaje(#) Tema: Re: [Ayudenme] Leaderbord contador [Ayudenme] Leaderbord contador Clock10

Volver arriba Ir abajo
 

[Ayudenme] Leaderbord contador

Ver el tema anterior Ver el tema siguiente Volver arriba 
Página 1 de 1.

 Temas similares

-
» Ayudenme estoy muriendo lento!
» ¡El espolímetro!
» [RECURSOS] Contador de palabras y caracteres
» lucho por ella? si o no? AYUDENME
» Ayudenme estoy muy nacesitado y triste por que las mujeres me tratan mal

Permisos de este foro:No puedes responder a temas en este foro.
Warcraft III - WorldEditor :: Zona de Aprendizaje(Dudas) :: General-