BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
|
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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_PARTICLEBURST) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_PARTICLEBURST) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_PARTICLEBURST) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_DLIGHT) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_DLIGHT) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0) write_byte(TE_DLIGHT) // TE id engfunc(EngFunc_WriteCoord, originF[0]) // x engfunc(EngFunc_WriteCoord, originF[1]) // y engfunc(EngFunc_WriteCoord, originF[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.
|
|