Koleshy Engine
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

[KE] Funcion GUI AddCooldown

Ir abajo

[KE] Funcion GUI AddCooldown Empty [KE] Funcion GUI AddCooldown

Mensaje por Koleshy Vie Dic 18, 2015 1:49 pm

[KE] Funcion GUI AddCooldown

Descripcion: Funcion que te permite agregar un cooldown invisible con X id (para identificar una habilidad) durante X cantidad de tiempo en X unidad.

Detonadores de la Funcion:

Código:
AddCooldown
   Acontecimientos
   Condiciones
   Acciones
       -------- ###### .::Maqueta::. ###### --------
       -------- AddCooldown(unidad, id, tiempo) --------
       -------- ###################### --------
       -------- id >>> es con el cual se identificara a una habilidad --------
       -------- IMPORTANTE: un id no puede repetirse con otro, o los cooldown se cruzaran... --------
       -------- --------------------------------------------------------- --------
       -------- CONFIGURACION: "Limitaciones" --------
       -------- cuando importen con todo y variables esta funcion --------
       -------- es posible que la variable "AddCooldown_CD" su formacion sea del valor de 1 --------
       -------- ese valor 1 se identifica como su limite. A que me refiero con esto? --------
       -------- me refiero a que solo podra soportar hasta el ID del valor 1 --------
       -------- si van a usarlo en 3 habilidades, pues obviamente cambiamos ese valor de formacion a 3 --------
       -------- y bueno asi ya ustedes van viendo  hasta que valor de formacion usan... --------
       -------- --------------------------------------------------------- --------
       -------- Se requiere de esta condicion con el ID respectivo al que usaras --------
       -------- ((Unidad) is in AddCooldown_CD[ID]) igual False --------
       -------- PD: mira los ejemplos si no entiendes... --------
       Set AddCooldownSYS_Unit = AddCooldownSYS_Unit
       Set AddCooldownSYS_ID = AddCooldownSYS_ID
       Set AddCooldownSYS_Tiempo = AddCooldownSYS_Tiempo
       -------- ------------------------------------------- --------
       Set AddCooldown_IDX[0] = (AddCooldown_IDX[0] + 1)
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           Si: Condiciones
               AddCooldown_IDX[0] Igual a 1
           Entonces: Acciones
               Detonador - Turn on AddCooldown Loop <gen>
           Otros: Acciones
       Set AddCooldown_C[AddCooldown_IDX[0]] = 0
       Set AddCooldown_T[AddCooldown_IDX[0]] = AddCooldownSYS_Tiempo
       Set AddCooldown_Unit[AddCooldown_IDX[0]] = AddCooldownSYS_Unit
       Set AddCooldown_ID[AddCooldown_IDX[0]] = AddCooldownSYS_ID
       Grupo de unidad - Add AddCooldown_Unit[AddCooldown_IDX[0]] to AddCooldown_CD[AddCooldown_ID[AddCooldown_IDX[0]]]

Código:
AddCooldown Loop
   Acontecimientos
       Tiempo - Every 0.03 seconds of game time
   Condiciones
   Acciones
       For each (Integer AddCooldown_IDX[1]) from 1 to AddCooldown_IDX[0], do (Actions)
           Bucle: Acciones
               Set AddCooldown_C[AddCooldown_IDX[1]] = (AddCooldown_C[AddCooldown_IDX[1]] + 1)
               If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                   Si: Condiciones
                       AddCooldown_C[AddCooldown_IDX[1]] Igual a (Integer((AddCooldown_T[AddCooldown_IDX[1]] / 0.03)))
                   Entonces: Acciones
                       Grupo de unidad - Remove AddCooldown_Unit[AddCooldown_IDX[1]] from AddCooldown_CD[AddCooldown_ID[AddCooldown_IDX[1]]]
                       Set AddCooldown_C[AddCooldown_IDX[1]] = AddCooldown_C[AddCooldown_IDX[0]]
                       Set AddCooldown_T[AddCooldown_IDX[1]] = AddCooldown_T[AddCooldown_IDX[0]]
                       Set AddCooldown_Unit[AddCooldown_IDX[1]] = AddCooldown_Unit[AddCooldown_IDX[0]]
                       Set AddCooldown_ID[AddCooldown_IDX[1]] = AddCooldown_ID[AddCooldown_IDX[0]]
                       Set AddCooldown_IDX[1] = (AddCooldown_IDX[1] - 1)
                       Set AddCooldown_IDX[0] = (AddCooldown_IDX[0] - 1)
                       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                           Si: Condiciones
                               AddCooldown_IDX[0] Igual a 0
                           Entonces: Acciones
                               Detonador - Turn off (This trigger)
                           Otros: Acciones
                   Otros: Acciones

Ejemplos como usar: los ejemplos estan en el mismo mapa con la funcion incluida. descarguelo y revise c:

descarga
[Tienes que estar registrado y conectado para ver este vínculo]
Koleshy
Koleshy
Pendejo
Pendejo

Mensajes : 37
Fecha de inscripción : 21/11/2013
Edad : 27
Localización : Lima, Perú

https://koleshyengine.foroactivo.mx

Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.