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 AddAnnMSG

Ir abajo

[KE] Funcion GUI AddAnnMSG Empty [KE] Funcion GUI AddAnnMSG

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

[KE] Funcion GUI AddAnnMSG

Descripcion: Funcion que te permite agregar un Mensaje tipo Anuncio en X posicion con X incremento e X velocidad de incremento por X cantidad de tiempo.

Imagen de Prueba:

[KE] Funcion GUI AddAnnMSG 4NEjfPQ

Detonador de la Funcion:

Código:
AddAnnMSG
   Acontecimientos
   Condiciones
   Acciones
       -------- ###### .::Maqueta::. ###### --------
       -------- AddAnnMSG(mensaje, posicion, incremento, velocidad, limite, tiempo) --------
       -------- ###################### --------
       Set AddAnnMSGSYS_Mensaje = AddAnnMSGSYS_Mensaje
       Set AddAnnMSGSYS_Posicion = AddAnnMSGSYS_Posicion
       Set AddAnnMSGSYS_Incremento = AddAnnMSGSYS_Incremento
       Set AddAnnMSGSYS_Velocidad = AddAnnMSGSYS_Velocidad
       Set AddAnnMSGSYS_Limite = AddAnnMSGSYS_Limite
       Set AddAnnMSGSYS_Tiempo = AddAnnMSGSYS_Tiempo
       -------- ------------------------------------------- --------
       Set AddAnnMSG_IDX[0] = (AddAnnMSG_IDX[0] + 1)
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           Si: Condiciones
               AddAnnMSG_IDX[0] Igual a 1
           Entonces: Acciones
               Detonador - Turn on AddAnnMSG Loop <gen>
           Otros: Acciones
       Set AddAnnMSG_C[AddAnnMSG_IDX[0]] = 0
       Set AddAnnMSG_A[AddAnnMSG_IDX[0]] = 0
       Set AddAnnMSG_AI[AddAnnMSG_IDX[0]] = 0.00
       Set AddAnnMSG_T[AddAnnMSG_IDX[0]] = AddAnnMSGSYS_Tiempo
       Set AddAnnMSG_I[AddAnnMSG_IDX[0]] = AddAnnMSGSYS_Incremento
       Set AddAnnMSG_V[AddAnnMSG_IDX[0]] = AddAnnMSGSYS_Velocidad
       Set AddAnnMSG_L[AddAnnMSG_IDX[0]] = AddAnnMSGSYS_Limite
       Set AddAnnMSG_M[AddAnnMSG_IDX[0]] = AddAnnMSGSYS_Mensaje
       Texto flotante - Create floating text that reads AddAnnMSGSYS_Mensaje at AddAnnMSGSYS_Posicion with Z offset 0.00, using font size 1.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
       Set AddAnnMSG_TxT[AddAnnMSG_IDX[0]] = (Last created floating text)
       Custom script:   call RemoveLocation(udg_AddAnnMSGSYS_Posicion)

Código:
AddAnnMSG Loop
   Acontecimientos
       Tiempo - Every 0.03 seconds of game time
   Condiciones
   Acciones
       For each (Integer AddAnnMSG_IDX[1]) from 1 to AddAnnMSG_IDX[0], do (Actions)
           Bucle: Acciones
               Set AddAnnMSG_C[AddAnnMSG_IDX[1]] = (AddAnnMSG_C[AddAnnMSG_IDX[1]] + 1)
               If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                   Si: Condiciones
                       AddAnnMSG_C[AddAnnMSG_IDX[1]] Igual a (Integer((AddAnnMSG_T[AddAnnMSG_IDX[1]] / 0.03)))
                   Entonces: Acciones
                       Texto flotante - Destroy AddAnnMSG_TxT[AddAnnMSG_IDX[1]]
                       Set AddAnnMSG_TxT[AddAnnMSG_IDX[1]] = AddAnnMSG_TxT[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_AI[AddAnnMSG_IDX[1]] = AddAnnMSG_AI[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_A[AddAnnMSG_IDX[1]] = AddAnnMSG_A[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_V[AddAnnMSG_IDX[1]] = AddAnnMSG_V[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_L[AddAnnMSG_IDX[1]] = AddAnnMSG_L[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_M[AddAnnMSG_IDX[1]] = AddAnnMSG_M[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_C[AddAnnMSG_IDX[1]] = AddAnnMSG_C[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_T[AddAnnMSG_IDX[1]] = AddAnnMSG_T[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_I[AddAnnMSG_IDX[1]] = AddAnnMSG_I[AddAnnMSG_IDX[0]]
                       Set AddAnnMSG_IDX[1] = (AddAnnMSG_IDX[1] - 1)
                       Set AddAnnMSG_IDX[0] = (AddAnnMSG_IDX[0] - 1)
                       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                           Si: Condiciones
                               AddAnnMSG_IDX[0] Igual a 0
                           Entonces: Acciones
                               Detonador - Turn off (This trigger)
                           Otros: Acciones
                   Otros: Acciones
                       Set AddAnnMSG_A[AddAnnMSG_IDX[1]] = (AddAnnMSG_A[AddAnnMSG_IDX[1]] + 1)
                       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                           Si: Condiciones
                               AddAnnMSG_A[AddAnnMSG_IDX[1]] Igual a (Integer((AddAnnMSG_V[AddAnnMSG_IDX[1]] / 0.03)))
                           Entonces: Acciones
                               If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                   Si: Condiciones
                                       AddAnnMSG_AI[AddAnnMSG_IDX[1]] Menor que AddAnnMSG_L[AddAnnMSG_IDX[1]]
                                   Entonces: Acciones
                                       Set AddAnnMSG_AI[AddAnnMSG_IDX[1]] = (AddAnnMSG_AI[AddAnnMSG_IDX[1]] + AddAnnMSG_I[AddAnnMSG_IDX[1]])
                                       Texto flotante - Change text of AddAnnMSG_TxT[AddAnnMSG_IDX[1]] to AddAnnMSG_M[AddAnnMSG_IDX[1]] using font size AddAnnMSG_AI[AddAnnMSG_IDX[1]]
                                   Otros: Acciones
                               Set AddAnnMSG_A[AddAnnMSG_IDX[1]] = 0
                           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.