mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
61
lua/entities/obj_vj_hlr1_stukabomb.lua
Normal file
61
lua/entities/obj_vj_hlr1_stukabomb.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
/*--------------------------------------------------
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
--------------------------------------------------*/
|
||||
AddCSLuaFile()
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.Base = "obj_vj_projectile_base"
|
||||
ENT.PrintName = "Stuka Bomb"
|
||||
ENT.Author = "DrVrej"
|
||||
ENT.Contact = "http://steamcommunity.com/groups/vrejgaming"
|
||||
ENT.Information = "Projectiles for my addons"
|
||||
ENT.Category = "Projectiles"
|
||||
|
||||
if CLIENT then
|
||||
local Name = "Stuka Bomb"
|
||||
local LangName = "obj_vj_hlr1_stukabomb"
|
||||
language.Add(LangName, Name)
|
||||
killicon.Add(LangName,"HUD/killicons/default",Color(255,80,0,255))
|
||||
language.Add("#"..LangName, Name)
|
||||
killicon.Add("#"..LangName,"HUD/killicons/default",Color(255,80,0,255))
|
||||
end
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
if !SERVER then return end
|
||||
|
||||
ENT.Model = "models/spitball_medium.mdl" -- The models it should spawn with | Picks a random one from the table
|
||||
ENT.DoesRadiusDamage = true -- Should it do a blast damage when it hits something?
|
||||
ENT.RadiusDamageRadius = 60 -- How far the damage go? The farther away it's from its enemy, the less damage it will do | Counted in world units
|
||||
ENT.RadiusDamage = 35 -- How much damage should it deal? Remember this is a radius damage, therefore it will do less damage the farther away the entity is from its enemy
|
||||
ENT.RadiusDamageUseRealisticRadius = true -- Should the damage decrease the farther away the enemy is from the position that the projectile hit?
|
||||
ENT.RadiusDamageType = DMG_ACID -- Damage type
|
||||
-- ENT.DecalTbl_DeathDecals = {"VJ_HLR_Spit_Acid"}
|
||||
ENT.SoundTbl_Idle = {"vj_hlr/hl1_npc/bullchicken/bc_acid1.wav", "vj_hlr/hl1_npc/bullchicken/bc_acid2.wav"}
|
||||
ENT.SoundTbl_OnCollide = {"vj_hlr/hl1_npc/bullchicken/bc_spithit1.wav", "vj_hlr/hl1_npc/bullchicken/bc_spithit2.wav"}
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomPhysicsObjectOnInitialize(phys)
|
||||
phys:Wake()
|
||||
phys:SetBuoyancyRatio(0)
|
||||
phys:EnableDrag(false)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomOnInitialize()
|
||||
ParticleEffectAttach("vj_hlr_spit_stukabat",PATTACH_ABSORIGIN_FOLLOW,self,0)
|
||||
|
||||
self:SetNoDraw(true)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:DeathEffects(data, phys)
|
||||
ParticleEffect("vj_hlr_spit_stukabat_impact",data.HitPos,Angle(0,0,0),nil)
|
||||
end
|
||||
Reference in New Issue
Block a user