[QUOTE=ChloeBlackSythe;27099643]Omg, I love fireworks and I just saw the thread, Pretty awesome to say the least. Be sure to pat yourself on the back for making this epic creation for new years![/QUOTE]
^^ I agree this is amazing. Keep up the good work guys!
[QUOTE=Fatman55;23120863]Add crackling ones![/QUOTE]
maybe this is useful for crackling fireworks
[lua]
function ENT:Crackle()
local time = 0
local index = self:EntIndex()
local pos = self:GetPos()
timer.Create("myrocket" .. index, 0, 0, function()
if time > 1 then
timer.Destroy("myrocket" .. index)
end
time = time + (speed or 0.02)
if math.random() > time then
-- a hack for louder distorted clicks
-- maybe you can randomize the max (50) instead
for i = 1, 50 do
WorldSound("npc/combine_soldier/vo/on1.wav", pos, math.random(160), math.random(80, 255))
end
end
end)
end
[/lua]
[editline]31st December 2010[/editline]
I used it in my firework rocket and it sounds kind of nice
you could probably use custom sounds instead, but this uses no custom content if you're against it or something
This is really fun. I like the sounds and effects. It reminds me of the pyroteknix addon from way back. Not sure if you have heard of it but it might be good to look at for ideas, etc.
Edit: I think a single/multi rocket launcher would be handy. Coupled with some variable edits maybe through wire or etc, it would be cool to have a semi automated system of launching rockets.
This looks awesome! I will be adding it to my server right away (that primarily runs custom firework maps for the old Pyroteknix).
eng101 is back in black. Thanks for using my map in your screenshots. I remember your earlier beta of this addon and you improved it so much.
To be clear...this is completely dead, right?
It's a shame if it is :saddowns:
I'm going to (try) to add Wiremod support to these. If I get it working, I'll post a download here (unless OP wants me to take it down/not put one up to begin with)
[editline]10th May 2011[/editline]
damn automerge broke >: (
This mod is generally complete. I wouldn't be upset if you stopped working on it right now but you should add some mini firework ents or something. Fountains, bottle rockets, etc.
I added wire Functionality to the fireworks, just to start the fuse etc.
[code]
ddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )
function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then return end
local SpawnPos = tr.HitPos + tr.HitNormal * 24
local ent = ents.Create( 'sent_firework' )
ent:SetPos( SpawnPos )
ent:SetAngles( Angle(180, 0, 0) )
ent:Spawn()
ent:Activate()
return ent
end
function ENT:Initialize()
self:SetModel( 'models/props_junk/propane_tank001a.mdl' )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:SetUseType( SIMPLE_USE )
self.Launched = false
self.FuseStarted = false
local phys = self:GetPhysicsObject()
if phys:IsValid() then
phys:Wake()
end
if(WireAddon != nil) then
self.WireDebugName = "Firework"
--self.Outputs = Wire_CreateOutputs(self.Entity, {"Energy","Active"})
self.Inputs = Wire_CreateInputs( self.Entity, {"Fire [NORMAL]"});
end
self:StartMotionController()
end
function ENT:TriggerInput(k,v)
if(k=="Fire") and (v != 0) then
self.Entity:Use()
end
--if (k == "Vector") then self.TargetPos = v end
end
/*---------------------------------------------------------
Name: PhysicsCollide
---------------------------------------------------------*/
function ENT:PhysicsCollide( Data, Phys )
if Data.Speed > 500 && self.Launched && self.CollisionExplode then
self:Explode()
end
end
function ENT:SetupDataTables()
self:DTVar( "Int", 0, "FuseLevel" );
self:DTVar( "Vector", 0, "FlameColor" ) -- Using a Vector because there's no way of sending Color via datatable. (Please inform me if there is)
end
function ENT:SetupData( Col, FuseTime, Scale, AutoUnfreeze, ExplodeTime, FlameColor, DamageExplode, CollisionExplode, TrajectoryRand, BlastDamage )
self.Col = Col || Color( 255, 255, 255 )
self.FuseTime = FuseTime || 2
self.FWScale = Scale || 1
self.AutoUnfreeze = AutoUnfreeze != false
self.ExplodeTime = ExplodeTime || 0
self.FlameColor = FlameColor || Vector( 255, 165, 0 )
self.DamageExplode = DamageExplode != false
self.CollisionExplode = CollisionExplode != false
self.TrajectoryRand = TrajectoryRand || 10
self.BlastDamage = BlastDamage != false
// Make FlameColor brighter, because it looks really bad when its one pure color. (255, 0, 0) for example
local Hue, Saturation, Value = ColorToHSV( Color( FlameColor.x, FlameColor.y, FlameColor.z ) )
local Col = HSVToColor( Hue, Saturation/3, Value )
local NewFlame = Vector( Col.r, Col.g, Col.b ) || Vector( 255, 165, 0 )
self:SetDTVector( 0, NewFlame )
end
function ENT:OnTakeDamage( dmginfo )
self:TakePhysicsDamage( dmginfo )
if self.DamageExplode then self:Explode(); end
end
function ENT:PhysicsSimulate( phys, deltatime )
if !self.Launched then return SIM_NOTHING end
local ForceAngle = Vector( 0, 0, 0 )
local ForceLinear = Vector( 0, 0, -4750 )
local Traj = self.TrajectoryRand
if Traj != 0 then
ForceAngle = VectorRand()*25*Traj
local RandForceLinear = VectorRand()*225*Traj
ForceLinear = Vector( RandForceLinear.x, RandForceLinear.y, -4750 )
end
if self.ExplodeTime != 0 then
local Num = self.ExplodeTime
local Frac = ( -( CurTime() - (self.LaunchTime) ) + Num ) / Num
ForceLinear.z = ForceLinear.z*Frac
end
return ForceAngle, ForceLinear, SIM_LOCAL_ACCELERATION
end
function ENT:Explode()
if self.Exploded then return end
self.Exploded = true
--for i=0, 5 do
local ED = EffectData()
ED:SetOrigin( self:GetPos() )
ED:SetStart( Vector( self.Col.r, self.Col.g, self.Col.b ) ) // Vector is color.
ED:SetScale( self.FWScale )
local effect = util.Effect( 'firework_explosion', ED )
--end
local DoBlastDamage = self.BlastDamage -- I have to save this as a variable because I'm removing the entity before blast damage (more information in comment below)
self:Remove()
-- NOTE!!! Make sure this is called AFTER IT IS REMOVED!
-- Otherwise, itll cause an infinite loop of creating the effect + exploding.
-- (It was pretty cool, though)
if DoBlastDamage then util.BlastDamage( self, self.pl || self, self:GetPos(), 512*self.FWScale, 350 ); end
end
local function SafeExplode( Ent )
if !ValidEntity( Ent ) then return end
Ent:Explode()
end
function ENT:Launch()
if !self.FuseStarted then return end
if self.Launched then return end
self:EmitSound( 'fireworks/firework_launch_'..math.random( 1, 2 )..'.wav', 165, math.Rand( 75, 125 ) )
self:SetDTInt( 0, 2 ) -- This controls the flame effect
local Phys = self:GetPhysicsObject()
if Phys:IsValid() then
if self.AutoUnfreeze then Phys:EnableMotion( true ); end
Phys:Wake()
end
if self.ExplodeTime != 0 then timer.Simple( self.ExplodeTime, SafeExplode, self ); end
self.LaunchTime = CurTime()
self.Launched = true
local ED = EffectData()
ED:SetOrigin( self:GetPos() + self:GetUp()*19 )
util.Effect( 'cball_explode', ED )
end
local function SafeLaunch( Ent )
if !ValidEntity( Ent ) then return end
Ent:Launch()
end
function ENT:StartFuse()
if self.FuseStarted then return end
self:SetDTInt( 0, 1 ) -- This controls the flame effect
timer.Simple( self.FuseTime, SafeLaunch, self )
self.FuseStarted = true
end
function ENT:Use( activator, caller )
self:StartFuse()
end
[/code]
Just replace the init.lua file in your sent_firework with this one, and you will have the wire input.
You're missing a capital A in the first line, but thanks so much :D
[QUOTE=Fleamonji;29729918]To be clear...this is completely dead, right?
It's a shame if it is :saddowns:[/QUOTE]
Sorry for taking a long time to respond, I'm not used to checking this section because it's not very active!
I've gone ahead and added some wiremod support to them, here's the list of I/O:
[release][b]Inputs:[/b]
• Start Fuse
• Launch
• Explode
• Instability
• Scale
• Explode Color RGB
• Trail Color RGB
[b]Outputs:[/b]
• Fuse Started
• Launched
• Exploded[/release]
The download is in the OP, and if you find any bugs [i]please[/i] tell me in this thread!
Oh, and happy fourth of july!
Someone needs to make a server, Noaw!, we should all make some daym fireworks :D
[QUOTE=Zupinata;30887732]Someone needs to make a server, Noaw!, we should all make some daym fireworks :D[/QUOTE]
69.197.189.12:27015
Can fireworks be launched without wire? When I press E they are not launching.
Is there any reason why the fireworks would be doing..this?
[thumb]http://dl.dropbox.com/u/8664592/sb_omen0000.jpg[/thumb]
Umm how do u launch the fireworks?? Do u need wire mod to do it??
So these use particle systems?
Add fountains
[QUOTE=XxOmnificentxX;30918702]Umm how do u launch the fireworks?? Do u need wire mod to do it??[/QUOTE]
Press e on it to activate
[QUOTE=metrotyranno;30984049]
Press e on it to activate[/QUOTE]
They are only starting to fuse =(
Would someone kindly inform me how to increase the maximum amount of fireworks allowed?
[QUOTE=molasses;31083699]Would someone kindly inform me how to increase the maximum amount of fireworks allowed?[/QUOTE]
+1
Need to know..
Instead of saying we're dumb, you can answer us.
[QUOTE=molasses;31083699]Would someone kindly inform me how to increase the maximum amount of fireworks allowed?[/QUOTE]
You can use the cvar [i]sbox_maxfireworks[/i] to control the limit.
[QUOTE=Lyoko774;30915185]Is there any reason why the fireworks would be doing..this?
[thumb]http://dl.dropbox.com/u/8664592/sb_omen0000.jpg[/thumb][/QUOTE]
The only thing I can think of is if the fireworks got into a 3D skybox somehow. Or perhaps another addon is conflicting with it?
Epic bump, interested if this mod is being developed or if this is just a final release...no ideas to recommend though.
bump this needs to continue sadface
Hey, I uploaded a video about these Fireworks if anyone cares to watch it :D
[url]http://www.youtube.com/watch?v=7FkEhFnJGGQ&list=UU6cBmRWn29SVk2x9wumkU5A&index=1&feature=plcp[/url]
Is there a chance that a Garry's Mod 13 version if this will be available?
Sorry, you need to Log In to post a reply to this thread.