[ZP] Как сделать эффект к гранате Infection для ZP 4.3

[ZP] Как сделать эффект к гранате Infection для ZP 4.3?

Для начала открываем исходник главного мода, у меня это "zombie_plague40."

[1]. После того как мы открыли исходник главного мода, ищем такие строчки как:

// CS sounds
new const sound_flashlight[] = "items/flashlight1.wav"
new const sound_buyammo[] = "items/9mmclip1.wav"
new const sound_armorhit[] = "player/bhit_helmet-1.wav" 


Ниже добавляем:

new g_infect_gibs


[2]. Далее ищем:

// Custom sprites for grenades
g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
g_flameSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_fire)
g_smokeSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_smoke)
g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)


Ниже добавляем:

g_infect_gibs = precache_model("sprites/Infection.spr")


[3]. Далее находим:

// Infection Bomb Explosion
infection_explode(ent)
{


После строчек:

// Make the explosion
create_blast3(originF)

Добавляем:

message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( TE_SPRITETRAIL ) // Throws a shower of sprites or models
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // start pos
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 200.0)
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // velocity
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 30.0)
write_short(g_infect_gibs) // spr
write_byte(60) // (count)
write_byte(random_num(27,30)) // (life in 0.1's)
write_byte(2) // byte (scale in 0.1's)
write_byte(50) // (velocity along vector in 10's)
write_byte(10) // (randomness of velocity in 10's)
message_end()


You do not have access to download files from our Website.

Hello, Our administration publishes only cannon content, put like under the post below and write the top comment, we are preparing the material just for you, Darling Гость.

Comments 1
  1. TexasLox
    А смысл был разделять инфекционную гранату и обычные на разные посты?
    • 2 April 2018 22:52
Users belonging to group Guests cannot add comments to this article.
Base for Your Build
Information

Welcome to TB-TEAM.COM!

To become a full-fledged user of our portal, you need to register.
Register
Create your own account!

Register Now
Log In
Already registered? Go ahead and log in!

Log In