mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
79
lua/entities/obj_vj_rpg_shells/init.lua
Normal file
79
lua/entities/obj_vj_rpg_shells/init.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
AddCSLuaFile("shared.lua")
|
||||
include("shared.lua")
|
||||
/*-----------------------------------------------
|
||||
*** Copyright (c) 2012-2018 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.
|
||||
-----------------------------------------------*/
|
||||
ENT.Model = {"models/weapons/w_missile_launch.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 = 350 -- 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 = 150 -- 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_BLAST -- Damage type
|
||||
ENT.RadiusDamageForce = 150 -- Put the force amount it should apply | false = Don't apply any force
|
||||
ENT.ShakeWorldOnDeath = true -- Should the world shake when the projectile hits something?
|
||||
ENT.ShakeWorldOnDeathAmplitude = 10 -- How much the screen will shake | From 1 to 16, 1 = really low 16 = really high
|
||||
ENT.ShakeWorldOnDeathRadius = 3000 -- How far the screen shake goes, in world units
|
||||
ENT.ShakeWorldOnDeathtDuration = 1 -- How long the screen shake will last, in seconds
|
||||
ENT.ShakeWorldOnDeathFrequency = 200 -- The frequency
|
||||
ENT.DecalTbl_DeathDecals = {"Scorch"}
|
||||
ENT.SoundTbl_Idle = {"weapons/rpg/rocket1.wav"}
|
||||
ENT.SoundTbl_OnCollide = {"ambient/explosions/explode_8.wav"}
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomOnInitialize()
|
||||
//util.SpriteTrail(self, 0, Color(90,90,90,255), false, 10, 1, 3, 1/(15+1)*0.5, "trails/smoke.vmt")
|
||||
ParticleEffectAttach("vj_rpg1_smoke", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
ParticleEffectAttach("vj_rpg2_smoke2", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
//ParticleEffectAttach("rocket_smoke", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
//ParticleEffectAttach("smoke_burning_engine_01", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
|
||||
/*self.StartLight1 = ents.Create("light_dynamic")
|
||||
self.StartLight1:SetKeyValue("brightness", "1")
|
||||
self.StartLight1:SetKeyValue("distance", "200")
|
||||
self.StartLight1:SetLocalPos(self:GetPos())
|
||||
self.StartLight1:SetLocalAngles( self:GetAngles() )
|
||||
self.StartLight1:Fire("Color", "255 150 0")
|
||||
self.StartLight1:SetParent(self)
|
||||
self.StartLight1:Spawn()
|
||||
self.StartLight1:Activate()
|
||||
self.StartLight1:Fire("TurnOn", "", 0)
|
||||
self:DeleteOnRemove(self.StartLight1)*/
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:DeathEffects(data,phys)
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin(data.HitPos)
|
||||
//effectdata:SetScale( 500 )
|
||||
|
||||
util.Effect( "ThumperDust", effectdata )
|
||||
util.Effect( "Explosion", effectdata )
|
||||
|
||||
|
||||
self.ExplosionLight1 = ents.Create("light_dynamic")
|
||||
self.ExplosionLight1:SetKeyValue("brightness", "4")
|
||||
self.ExplosionLight1:SetKeyValue("distance", "300")
|
||||
self.ExplosionLight1:SetLocalPos(data.HitPos)
|
||||
self.ExplosionLight1:SetLocalAngles(self:GetAngles())
|
||||
self.ExplosionLight1:Fire("Color", "255 150 0")
|
||||
self.ExplosionLight1:SetParent(self)
|
||||
self.ExplosionLight1:Spawn()
|
||||
self.ExplosionLight1:Activate()
|
||||
self.ExplosionLight1:Fire("TurnOn", "", 0)
|
||||
self:DeleteOnRemove(self.ExplosionLight1)
|
||||
end
|
||||
/*-----------------------------------------------
|
||||
*** Copyright (c) 2012-2018 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.
|
||||
-----------------------------------------------*/
|
||||
42
lua/entities/obj_vj_rpg_shells/shared.lua
Normal file
42
lua/entities/obj_vj_rpg_shells/shared.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.Base = "obj_vj_projectile_base"
|
||||
ENT.PrintName = "Tank Shell"
|
||||
ENT.Author = "DrVrej"
|
||||
ENT.Contact = "http://steamcommunity.com/groups/vrejgaming"
|
||||
ENT.Information = "Projectiles for my addons"
|
||||
ENT.Category = "Projectiles"
|
||||
|
||||
if (CLIENT) then
|
||||
local Name = "Tank Shell"
|
||||
local LangName = "obj_vj_tank_shell"
|
||||
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))
|
||||
|
||||
function ENT:Think()
|
||||
if self:IsValid() then
|
||||
self.Emitter = ParticleEmitter(self:GetPos())
|
||||
self.SmokeEffect1 = self.Emitter:Add("particles/flamelet2",self:GetPos() +self:GetForward()*-7)
|
||||
self.SmokeEffect1:SetVelocity(self:GetForward() *math.Rand(0, -50) +Vector(math.Rand(5, -5), math.Rand(5, -5), math.Rand(5, -5)) +self:GetVelocity())
|
||||
self.SmokeEffect1:SetDieTime(0.2)
|
||||
self.SmokeEffect1:SetStartAlpha(100)
|
||||
self.SmokeEffect1:SetEndAlpha(0)
|
||||
self.SmokeEffect1:SetStartSize(10)
|
||||
self.SmokeEffect1:SetEndSize(1)
|
||||
self.SmokeEffect1:SetRoll(math.Rand(-0.2,0.2))
|
||||
self.SmokeEffect1:SetAirResistance(200)
|
||||
self.Emitter:Finish()
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user