Not all of us have time to create summer-y systems in our games so today I made a modular scriptable firework and a synced day/night script for anyone that wants them.
The firework is very customizable and it works with FilteringEnabled. They explode into random patterns and all of the particles are local parts, making for an extremely smooth effect. Additionally, mobile platforms get a separate number of particles (another customizable feature). There are properties, methods, and events so you can use it however you want. If you just want to watch them in action, however, you can see them here
The synced day/night script isn’t quite as exciting, but it occurred to me that some people may not know how to make one, and then their player counts would become the victims of server hoppers.
If you guys make anything that could be used in event games please post it here. Also, if there’s something you really want but don’t know how/don’t have the time to make it, post here and I’ll see what I can do.
Enjoy!
[strike]EDIT: Tomorrow’s plans are to add a ParticleFireSize NumberValue and to have the particles fade away instead of suddenly disappearing (non-mobile-only, of course). I’ll also try to add anything you guys ask for so ask away. Tomorrow’s updates also include, as per request, InitialParticleVelocity, MinimumBlastRadius, and MaximumBlastRadius properties to increase control over the particles.
EDIT 2: I also, after I’m no longer at my computer, realized that there’s a nuance in my coding the prevents the firework’s local script from being cloned to already existing players, so only players that join after the model is created can see the effects. That issue will be fixed tomorrow.[/strike]
Don’t be afraid to tell me if you hate my stuff and you wish I had done something completely different. If you don’t tell me now then you’ll be disappointed at the next thing I make as well.
[quote] Super Cool! Will definitely be using this!
Some suggestions:
A good explosion sound for when they go off
A NumberValue to adjust the speed a Firework explodes, Right now it’s a bit slow
I haven’t looked at the scripts so this is purely based on what I saw in the game. [/quote]
1 - There is an explosion sound. I’ll make it louder. The light, fly, and explosion sounds are all just sitting there in the model and they’re reloaded every time a new rocket is created, so you can edit it further if you still aren’t satisfied.
2 - Will do. Thanks. I’ll also add in an AirResistance property to dull down the speed over time incase you want the explosion to happen fast but you don’t want you particles spreading all across the screen.
I also, after I’m no longer at my computer, realized that there’s a nuance in my coding the prevents the firework’s local script from being cloned to already existing players, so only players that join after the model is created can see the effects. That issue will be fixed tomorrow.
[quote] Super Cool! Will definitely be using this!
Some suggestions:
A good explosion sound for when they go off
A NumberValue to adjust the speed a Firework explodes, Right now it’s a bit slow
I haven’t looked at the scripts so this is purely based on what I saw in the game. [/quote]
1 - There is an explosion sound. I’ll make it louder. The light, fly, and explosion sounds are all just sitting there in the model and they’re reloaded every time a new rocket is created, so you can edit it further if you still aren’t satisfied.
2 - Will do. Thanks. I’ll also add in an AirResistance property to dull down the speed over time incase you want the explosion to happen fast but you don’t want you particles spreading all across the screen.
I also, after I’m no longer at my computer, realized that there’s a nuance in my coding the prevents the firework’s local script from being cloned to already existing players, so only players that join after the model is created can see the effects. That issue will be fixed tomorrow.[/quote]
So this means I’m allowed to make my own fly, explode sounds? Gives me a few ideas
[quote] [quote="SmoothBlockModel " post=51206]Super Cool! Will definitely be using this!
Some suggestions:
A good explosion sound for when they go off
A NumberValue to adjust the speed a Firework explodes, Right now it’s a bit slow
I haven’t looked at the scripts so this is purely based on what I saw in the game. [/quote]
1 - There is an explosion sound. I’ll make it louder. The light, fly, and explosion sounds are all just sitting there in the model and they’re reloaded every time a new rocket is created, so you can edit it further if you still aren’t satisfied.
2 - Will do. Thanks. I’ll also add in an AirResistance property to dull down the speed over time incase you want the explosion to happen fast but you don’t want you particles spreading all across the screen.
I also, after I’m no longer at my computer, realized that there’s a nuance in my coding the prevents the firework’s local script from being cloned to already existing players, so only players that join after the model is created can see the effects. That issue will be fixed tomorrow.[/quote]
So this means I’m allowed to make my own fly, explode sounds? Gives me a few ideas[/quote]
You’re allowed to do whatever you want. It’s completely free and open source. No one is going to stop you from doing anything your heart desires.
Addendum to my AirResistance proposal - Instead of using a somewhat arbitrary value to determine how resistance is calculated I’m going to add MinimumBlastRadius and MaximumBlastRadius values instead. The only people who are going to use AirResistance are going to expect it to stop the particles after a certain distance. This change makes that far more easy to understand. This change will also make the behavior of explosions more intuitive and it opens opportunities to add more options for them, such as a blast radius multiplier.
All the requested updates are now live and there’s even some cool stuff that I snuck in there coughrotationcough
FIREWORK CHANGELOG 5/21
Fixed an issue where new fireworks wouldn’t appear for already-existing players
Added Bool .UpdateLoopsEnabled. If false, particles will not have update loops. If true, particles will respect the new features that use update loops. Update loops are always disabled on mobile.
Sparkles are now mobile-only. This change was made because there is no SparkleTransparency property, so it’s impossible to fade them out along with the fire on desktop machines.
Added Numbers .MinBlastRadius and .MaxBlastRadius that can be used to control how large the explosions are
Added Number .InitialParticleVelocity that controls the speed at which the particles fly through the air.
Added Number .ParticleFireSize that controls how large the fires are.
.Exploded and .ExplodedLocal are now called with CFrame terminalFrame, Number shapeFactor, Number blastRadius, Vector3 rotationalVelocity
Added Vector3s .MinRotVelocity and .MaxRotVelocity so you can have rotating patterns.
:Explode() can now be called with Number forcedShapeFactor, Number forcedRadius, Vector3 forcedRotVelocity to better control your explosions
:Respawn() now takes Vector3 forcedSpawnLocation, Vector3 forcedRocketLookPosition
:Launch() now takes Vector3 forcedSpawnLocation, Vector3 forcedRocketLookPosition
:Ignite() now takes Vector3 forcedSpawnLocation, Vector3 forcedRocketLookPosition
.Launched() is now called with a Part rocket argument.
Added Numbers .RotVelocityPickupTime and .RotVelocityFalloffTime that allow you to dampen the rotation speed near the start and end of the lifetime
Added Number .FadeTime which determines how long before death the firework should wait before it fades out.
Fixed a possible issue with the particles not being cleared on respawn
For arcane reasons, rotation doesn’t work on X and Z axes. They have been disabled.
Added Number .ExplosionRadiusMultiplier that multiplies the explosion’s blast radius by the determined effect radius
Added Bool .FlickerEnabled that turns flicker sounds on/off. Flicker sounds are the snapping that you hear as a firework goes out.
Added FlickerSound that gets copied into the parts and then played
Added Bool .FusePartEnabled that will disable the fuse part and its fuse noise if false
BONUS CHANGELOG FROM AN HOUR OF BUG FIXES:
Only one local script is used now and it manages every rocket. This is a huge performance boost from my poorly thought-out original plan of having one localscript per rocket.
The latest version is uploaded to the model and the demo game. Check it out when you get the chance.
The new fireworks are much prettier and they have fading and rotating options so I encourage anyone who saw them before that update to go check them out sometime.
If you don’t mind I’m going to change some of the code so that its randomized fireworks colors ( if possible… ) [/quote]
No need to change any code - that’s what the values are for! There’s a .FireworkColor Color3Value that determines the color. In my demo place I set it to BrickColor.Random().Color just before I fire each rocket. Watch out, though - the rocket’s color isn’t sent over the explosion remote so if you change it before it blows up then the explosion will have the new color since it retrieves it from the rocket object.