Veteran Member
Join Date: Feb 2010
Location: Santa Fe, Argentina
|
05-29-2010
, 19:35
Re: [ES][ZP] Cambiar el sprite de la granada
|
#2
|
Quote:
Originally Posted by !Morte
gente, cambie el spr. de la granada y todo bien, pero cuando la tiro y explota se hace como un circulo y no sale el spr que le asigne :/
la parte el spr es esta
PHP Code:
create_blast2(const Float:originF[3])
{
// Smallest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
write_short(g_KBoom) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(100) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_KBoom) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(50) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Largest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+555.0) // z axis
write_short(g_KBoom) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(0) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
|
TE_BEAMCYLINDER
Borra todo eso y pone esto
PHP Code:
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITE) // TE id
engfunc(EngFunc_WriteCoord, originF[0]+random_float(120.0, -120.0)) // x
engfunc(EngFunc_WriteCoord, originF[1]+random_float(120.0, -120.0)) // y
engfunc(EngFunc_WriteCoord, originF[2]+10.0)
write_short(tu_sprite) // sprite
write_byte(random_num(1, 15)) // scale
write_byte(170) // brightness
message_end()
Y si queres que salga varias veces solo repite el code
Ejemplo:
PHP Code:
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITE) // TE id
engfunc(EngFunc_WriteCoord, originF[0]+random_float(120.0, -120.0)) // x
engfunc(EngFunc_WriteCoord, originF[1]+random_float(120.0, -120.0)) // y
engfunc(EngFunc_WriteCoord, originF[2]+10.0)
write_short(tu_sprite) // sprite
write_byte(random_num(1, 15)) // scale
write_byte(170) // brightness
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITE) // TE id
engfunc(EngFunc_WriteCoord, originF[0]+random_float(120.0, -120.0)) // x
engfunc(EngFunc_WriteCoord, originF[1]+random_float(120.0, -120.0)) // y
engfunc(EngFunc_WriteCoord, originF[2]+10.0)
write_short(tu_sprite) // sprite
write_byte(random_num(1, 15)) // scale
write_byte(170) // brightness
message_end()
Aclaración: Puede dar lag
__________________
################################
|
|