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 SetTimedStat

Ir abajo

[KE] Funcion GUI SetTimedStat Empty [KE] Funcion GUI SetTimedStat

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

[KE] Funcion GUI SetTimedStat

Descripcion: Funcion que te permite agregar/quitar cierto atributo (str/agi/int) durante X cantidad de tiempo en X unidad.

Detonador de la Funcion:

Código:
SetTimedStat
   Acontecimientos
   Condiciones
   Acciones
       -------- ###### .::Maqueta::. ###### --------
       -------- AddTimedAttrib(unidad, stat, amount, bool, tiempo) --------
       -------- ###################### --------
       -------- ------------------------------------------- --------
       -------- para el parametro "SetTimedStatSYS_Stat" --------
       -------- STR = Fuerza | AGI = Agilidad | INT = Inteligencia --------
       -------- ------------------------------------------- --------
       -------- Bool >>> true = agregar stat | false = quitar stat --------
       -------- ------------------------------------------- --------
       Set SetTimedStatSYS_Unit = SetTimedStatSYS_Unit
       Set SetTimedStatSYS_Stat = SetTimedStatSYS_Stat
       Set SetTimedStatSYS_Amount = SetTimedStatSYS_Amount
       Set SetTimedStatSYS_Bool = SetTimedStatSYS_Bool
       Set SetTimedStatSYS_Tiempo = SetTimedStatSYS_Tiempo
       -------- ------------------------------------------- --------
       Set SetTimedStat_IDX[0] = (SetTimedStat_IDX[0] + 1)
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           Si: Condiciones
               SetTimedStat_IDX[0] Igual a 1
           Entonces: Acciones
               Detonador - Turn on SetTimedStat Loop <gen>
           Otros: Acciones
       Set SetTimedStat_C[SetTimedStat_IDX[0]] = 0
       Set SetTimedStat_T[SetTimedStat_IDX[0]] = SetTimedStatSYS_Tiempo
       Set SetTimedStat_S[SetTimedStat_IDX[0]] = SetTimedStatSYS_Stat
       Set SetTimedStat_B[SetTimedStat_IDX[0]] = SetTimedStatSYS_Bool
       Set SetTimedStat_Unit[SetTimedStat_IDX[0]] = SetTimedStatSYS_Unit
       Set SetTimedStat_AM[SetTimedStat_IDX[0]] = SetTimedStatSYS_Amount
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           Si: Condiciones
               (SetTimedStat_Unit[SetTimedStat_IDX[0]] is Un hé️roe) Igual a True
           Entonces: Acciones
               If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                   Si: Condiciones
                       SetTimedStat_B[SetTimedStat_IDX[0]] Igual a True
                   Entonces: Acciones
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a STR) then do (Hé️roe - Modify Fuerza of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a AGI) then do (Hé️roe - Modify Agilidad of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a INT) then do (Hé️roe - Modify Inteligencia of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
                   Otros: Acciones
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a STR) then do (Hé️roe - Modify Fuerza of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a AGI) then do (Hé️roe - Modify Agilidad of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
                       If ((String(SetTimedStat_S[SetTimedStat_IDX[0]]) as Mayúsculas) Igual a INT) then do (Hé️roe - Modify Inteligencia of SetTimedStat_Unit[SetTimedStat_IDX[0]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[0]]) else do (Do nothing)
           Otros: Acciones

Código:
SetTimedStat Loop
   Acontecimientos
       Tiempo - Every 0.03 seconds of game time
   Condiciones
   Acciones
       For each (Integer SetTimedStat_IDX[1]) from 1 to SetTimedStat_IDX[0], do (Actions)
           Bucle: Acciones
               Set SetTimedStat_C[SetTimedStat_IDX[1]] = (SetTimedStat_C[SetTimedStat_IDX[1]] + 1)
               If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                   Si: Condiciones
                       SetTimedStat_C[SetTimedStat_IDX[1]] Igual a (Integer((SetTimedStat_T[SetTimedStat_IDX[1]] / 0.03)))
                   Entonces: Acciones
                       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                           Si: Condiciones
                               SetTimedStat_B[SetTimedStat_IDX[1]] Igual a True
                           Entonces: Acciones
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a STR) then do (Hé️roe - Modify Fuerza of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a AGI) then do (Hé️roe - Modify Agilidad of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a INT) then do (Hé️roe - Modify Inteligencia of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Sustraer SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                           Otros: Acciones
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a STR) then do (Hé️roe - Modify Fuerza of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a AGI) then do (Hé️roe - Modify Agilidad of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                               If ((String(SetTimedStat_S[SetTimedStat_IDX[1]]) as Mayúsculas) Igual a INT) then do (Hé️roe - Modify Inteligencia of SetTimedStat_Unit[SetTimedStat_IDX[1]]: Añadir SetTimedStat_AM[SetTimedStat_IDX[1]]) else do (Do nothing)
                       Set SetTimedStat_C[SetTimedStat_IDX[1]] = SetTimedStat_C[SetTimedStat_IDX[0]]
                       Set SetTimedStat_T[SetTimedStat_IDX[1]] = SetTimedStat_T[SetTimedStat_IDX[0]]
                       Set SetTimedStat_S[SetTimedStat_IDX[1]] = SetTimedStat_S[SetTimedStat_IDX[0]]
                       Set SetTimedStat_B[SetTimedStat_IDX[1]] = SetTimedStat_B[SetTimedStat_IDX[0]]
                       Set SetTimedStat_AM[SetTimedStat_IDX[1]] = SetTimedStat_AM[SetTimedStat_IDX[0]]
                       Set SetTimedStat_Unit[SetTimedStat_IDX[1]] = SetTimedStat_Unit[SetTimedStat_IDX[0]]
                       Set SetTimedStat_IDX[1] = (SetTimedStat_IDX[1] - 1)
                       Set SetTimedStat_IDX[0] = (SetTimedStat_IDX[0] - 1)
                       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                           Si: Condiciones
                               SetTimedStat_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.