Raised This Month: $ Target: $400
 0% 

[ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2


  
 
 
Thread Tools Display Modes
Author Message
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 23:15   [ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2
#1

TUTORIAL DE COMO CAMBIAR EL AURA Y PARTICULAS AL SER INFECTADO: ZP 4.2

Descripcion: Cambiarles el color a las particulas y al aura cuando un zombie te infecta


1 - Particulas:

Vamos a:

PHP Code:
infection_effects(id
Luego buscamos:

PHP Code:
    // Particle burst?
    
if (get_pcvar_num(cvar_infectionparticles))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_PARTICLEBURST// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_short(50// radius
        
write_byte(70// color rojo oscuro = 70
        
write_byte(3// duration (will be randomized a bit)
        
message_end()
    } 
Hay tenemos un color determinado, ese color es: Rojo mas oscuro, como savemos el color? al final del tutorial les dejo una imagen que dice el numero y el color. Guiense por eso !

PHP Code:
write_byte(70// color rojo oscuro = 70 
Entonces si queremos que las particulas sean Verdes vamos a la imagen y buscamos el color verde y su numero, entonces ponemos enves de 70
colocamos el numero correspondiente al verde que seria: 83 ó 188 son distintos verdes.

Nos quedaria asi:

PHP Code:
    // Particle burst?
    
if (get_pcvar_num(cvar_infectionparticles))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_PARTICLEBURST// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_short(50// radius
        
write_byte(83// color verde oliva = 83
        
write_byte(3// duration (will be randomized a bit)
        
message_end()
    } 
Pero tambien tenemos otra manera, que vendria a ser al azar entre el Rojo, Verde y Azul, para esto tenemos que usar el "ramdom_num".

Nos quedaria asi:

PHP Code:
    // Particle burst?
    
if (get_pcvar_num(cvar_infectionparticles))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_PARTICLEBURST// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_short(50// radius
        
write_byte(random_num(50,200)) // color
        
write_byte(3// duration (will be randomized a bit)
        
message_end()
    } 
2 - Aura

Bueno ahora buscamos esto:

PHP Code:
    // Light sparkle?
    
if (get_pcvar_num(cvar_infectionsparkle))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_byte(20// radius
        
write_byte(get_pcvar_num(cvar_nvgcolor[0])) // r
        
write_byte(get_pcvar_num(cvar_nvgcolor[1])) // g
        
write_byte(get_pcvar_num(cvar_nvgcolor[2])) // b
        
write_byte(2// life
        
write_byte(0// decay rate
        
message_end()
    } 
Hay lo esta seteando por el color de NVG, es decir si en la zombie_plague.cfg la cvar del NVG de los zombies esta en verde, el aura sera verde.

Para colocarle otro color que uno quiera nos vendria a quedar asi:

PHP Code:
    // Light sparkle?
    
if (get_pcvar_num(cvar_infectionsparkle))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_byte(20// radius
        
write_byte(0// rojo
        
write_byte(255// verde
        
write_byte(0// azul
        
write_byte(2// life
        
write_byte(0// decay rate
        
message_end()
    } 
Hay lo seteamos en verde, podemos ponerles otros colores editando esta parte:
PHP Code:
        write_byte(0// rojo
        
write_byte(255// verde
        
write_byte(0// azul 
Y tambien como en las particulas podemos usar un "random_num" para que salga al azar entre el Rojo, Verde y Azul.

Nos quedaria asi:

PHP Code:
    // Light sparkle?
    
if (get_pcvar_num(cvar_infectionsparkle))
    {
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_byte(20// radius
        
write_byte(random_num(50,200)) // r
        
write_byte(random_num(50,200)) // g
        
write_byte(random_num(50,200)) // b
        
write_byte(2// life
        
write_byte(0// decay rate
        
message_end()
    } 
Bueno, espero que les aya gustado...

Hay les deje la gamas de colores con sus numeros correspondientes.
Attached Thumbnails
Click image for larger version

Name:	palette.jpg
Views:	732
Size:	83.3 KB
ID:	54737  
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 12-05-2009 , 23:16   Re: [ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2
#2

Ya es exesivo xD
Raddish is offline
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 23:16   Re: [ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2
#3

jaja, es la misma podrida, "random_num" xD
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
larito
Veteran Member
Join Date: Nov 2008
Location: Argentina- Mendoza
Old 12-06-2009 , 10:29   Re: [ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2
#4

Bueno de por si veo que mejoro un toque el tutorial y no fueron intrucciones como antes (aunque no esta muy lejos eso que digamos).

Sigo insistiendo que tendrian que dejar de hacer tutoriales basados en el zp, ya se que despues vendran a pedir ayuda la mayoria por vago pero asi aprenderan. Me parece mas eficiente explicar como funcionan las particulas y el aura y que despues piensen y se la arreglen, eso opino yo.

Nota: Buen tutorial


PD: Si hacen un tutorial releanlo para que se entiendan bn por ejmplo mira pones "hay" en lugar de "ahí" o "allí" XD hay mucha diferencia entre una palabra y otra.
larito is offline
Send a message via MSN to larito
Cuchii
BANNED
Join Date: Sep 2009
Location: Cordoba,Argentina
Old 12-06-2009 , 15:48   Re: [ES][TUT][ZP] Color de Aura y Particulas al ser Infectado: ZP 4.2
#5

Buen tuto man ;)
Cuchii is offline
Send a message via MSN to Cuchii
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode