Battle Royale Storm System

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to get a nice storm system for a battle royale game
  2. What is the issue? Include screenshots / videos if possible!
    I just dont know where to start
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    ive joined the battle royale documentation but didnt rly get much from it
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- i dont have any code bc i dont know where to start
1 Like

Storm’s a circle right? So you could calculate the distance of every player to the centre of said circle, and deal damage if they’re too far away.

1 Like

i was thinking i could make a barier of parts that slowly shrink and deal dammage if you toutch it

Edit: after thinking abt it that would probaly work better i still dont know how visuals would work tho

ide need the visuals of the storm 2

that i can’t help you with - it’s scripting support after all

its not making the visuals its showing them
like ide need a ring of parts to show the closing in storm

You could probably just use Roblox’s modeling tools to negate and unionize a Cylinder part that has a “inside” and then color it a purpleish blue color

im not in studio so I’ll just describe it.

  1. Create a Cylinder part
  2. Resize it a bit (you can edit this later)
  3. Duplicate the Cylinder (CTRL+D or CMD+D)
  4. Hold shift and resize the new Cylinder just a bit but make sure the new Cylinder is sticking out of the top of the original Cylinder
  5. Go to the “Model” tab at the top and negate the new Cylinder (the one you just made smaller)
  6. Select both Cylinders in the Explorer and then union both parts
  7. there ya go

It’s basic but it does the job (I’m not sure about hitbox accuracy though)

You could also use a bunch of parts to form some kind of semi-circular shape and use textures or colors

Thanks Ill try this out! RN ima work on just the storm circle its self

1 Like

Quick question if ya know the answer to it:

Would calculating the distance between all the players and the center of the circle be more effective than using a bunch of hit boxes (for the players)?

the only problem i see about this is is when the box gets realy small around the outside of the map the visual would go away

1 Like

So what im trying right now is a get a Center circle then i check the players with run service if there outside the circle (ill have a radius to) so its like if HumanoidRootPart.Position.Magnitude, orgin (however you do that) is farther than the circles radius

2 Likes

Ok! just a quick update im geting closer to my solution and once i get it ill share it for all yall to work with! Happy Developing!

1 Like

Maybe use parts in radius instead or magnitude since they can go greater than 2048 studs.

2 Likes

Thanks! Im currently using a union because the map wont be to ginormous (also keep in mind 2000 studs is 4 base plates long so 16 baseplates in area

2 Likes

I shouldent need to so that because the map might be 2 baseplates at max

2 Likes

what do you mean by more effective? checking the distance is the most simplest and performant way to do this.

That said, if you want your storm to be something other than circular, hitboxes are probably a better idea.

2 Likes

What i do is it has an invisible point called orgin, then i have a script that checks the players distance from said orgin and if there outside then they get dammaged nerfed

2 Likes

Hello Everyone! this is how i solved this!

So in lighting i have a folder called “StormEffects” or somtin like that. when effects are inside of it they arnt shown

I have an orgin of the circle (aka the middle of the circle) its an immaginary point

I have a Radius that is essentially just makes the circle…

so i have a script that moves the orgin and resets the radius

I have a script that checks the players distance from orgin and compairs it to radius

BOOM now i have a storm system right?

NO i still need to show the plr where the storm is basicly i made a union of parts in a circle to make a storm wall gave it properties and i can change its size and that to make a circle!

Here is my orgin moving script (Its kinda weird)

-- Server Script

-- Storm Functionality For First Circle
local Max = nil
local X = script["XCordnate(Studs)"].Value
local Z = script["ZCordnate(Studs)"].Value
local NX = script["XCordnateNegative(Studs)"].Value
local NZ = script["ZCordnateNegative(Studs)"].Value
local TimeBetweenCircles = script["TimeBetweenCircles(NotIncludingClosingTime)"].Value
local ClosingTime = script.ClosingTime.Value
local Radius = (X * 2 + Z * 2) / 2

wait(TimeBetweenCircles)

game.Workspace.StormStats.StormBoarder.Size = Vector3.new(Radius * 2, game.Workspace.StormStats.StormBoarder.Size.Y, Radius * 2)
game.Workspace.StormStats.StormBoarder.Position = Vector3.new(0, game.Workspace.StormStats.StormBoarder.Position.Y, 0)

game.Workspace.StormStats.Radius.Value = Radius
game.Workspace.StormStats.OrginX.Value = 0
game.Workspace.StormStats.OrginZ.Value = 0
game.Workspace.StormStats.FirstDone.Value = true
game.Workspace.StormStats.StormBoarder.Transparency = 0.025
Max = Radius

-- Server Script (Same One)

-- Storm Functionality For Later Circles
local Circles = 0
repeat
	local OX = math.random(NX,X)
	local OZ = math.random(NZ,Z)
	local RX = math.random(X/2,X)
	local RZ = math.random(X/2,Z)
	local DepricateRate = script["TimeDepritiationRate(In%)"].Value
	local ClosingTime = script.ClosingTime.Value
	local TimeBetweenCircles = script["TimeBetweenCircles(NotIncludingClosingTime)"].Value
	local Orgin = {OX,OZ}
	local Depricate = DepricateRate/100
	wait(TimeBetweenCircles)
	Circles += 1
	local Radius = ((30 - game.ServerStorage.PlayersAlive.Value) / (RX + RZ)) * 25 -- Change The 25 To A Smaller/Bigger Number if you want
	
	if Circles >= 10 and game.ServerStorage.PlayersAlive.Value <= 4 then
		game.Workspace.StormStats.Radius.Value = 0
else
	
	if Max <= Radius then
		Max = Radius
	end
	
	local Bump = 1000
	local LerpBump = (1 / Bump)
	local SizeVector = Vector3.new((game.Workspace.StormStats.StormBoarder.Size.X - (Radius * 2)) / Bump, game.Workspace.StormStats.StormBoarder.Size.Y, (game.Workspace.StormStats.StormBoarder.Size.Z - (Radius * 2)) / Bump)
	local WaitTime = ClosingTime/Bump
	local Old = nil
	Old = game.Workspace.StormStats.StormBoarder.Position
	for i = 1,Bump do
		if Radius == Max then
			game.Workspace.StormStats.StormBoarder.Size = Vector3.new(game.Workspace.StormStats.StormBoarder.Size.X - SizeVector.X, game.Workspace.StormStats.StormBoarder.Size.Y, game.Workspace.StormStats.StormBoarder.Size.Z - SizeVector.Z)
		end
		Max = Radius
		game.Workspace.StormStats.StormBoarder.Position = Old:Lerp(Vector3.new(Orgin[1], game.Workspace.StormStats.StormBoarder.Position.Y, Orgin[2]), LerpBump)
		LerpBump += 1/Bump
		game.Workspace.StormStats.Radius.Value = game.Workspace.StormStats.StormBoarder.Size.X/2
		game.Workspace.StormStats.OrginX.Value = game.Workspace.StormStats.StormBoarder.Position.X
		game.Workspace.StormStats.OrginZ.Value = game.Workspace.StormStats.StormBoarder.Position.Z
		task.wait(WaitTime)
	end
	game.Workspace.StormStats.StormBoarder.Size = Vector3.new(Radius * 2, game.Workspace.StormStats.StormBoarder.Size.Y, Radius * 2)
	game.Workspace.StormStats.StormBoarder.Position = Vector3.new(Orgin[1], game.Workspace.StormStats.StormBoarder.Position.Y, Orgin[2])
	game.Workspace.StormStats.Radius.Value = Radius
	game.Workspace.StormStats.OrginX.Value = OX
		game.Workspace.StormStats.OrginZ.Value = OZ
		print(Depricate)
		ClosingTime -= ClosingTime * Depricate
		WaitTime -= WaitTime * Depricate
		end
until game.Workspace.GameEnded.Value == true or game.Workspace.StormStats.Radius.Value == 0
-- local script

local Rate = 2.5
local StormEffects = {}
for i,v in pairs(game.Lighting.StormEffects:GetChildren()) do
	table.insert(StormEffects, v)
end
repeat
	if workspace.StormStats.FirstDone.Value == true then
		local Radius = workspace.StormStats.Radius.Value
		local OrginX = workspace.StormStats.OrginX.Value
		local OrginZ = workspace.StormStats.OrginZ.Value
		local Distance = (script.Parent.PrimaryPart.Position - Vector3.new(OrginX,script.Parent.PrimaryPart.Position.Y,OrginZ)).magnitude
		if Distance >= Radius then
			script.Parent.TakeHealth:FireServer(Rate)
		end
		local CamDistance = (game.Workspace.CurrentCamera.CFrame.Position - Vector3.new(OrginX,script.Parent.PrimaryPart.Position.Y,OrginZ)).magnitude
		if CamDistance >= Radius then
			for i,v in pairs(StormEffects) do
				if v.Parent.Name ~= "Lighting" then
					v.Parent = v.Parent.Parent
				end
			end
		else
			for i,v in pairs(StormEffects) do
				if v.Parent.Name ~= "StormEffects" then
					v.Parent = v.Parent.StormEffects
				end
			end
		end
	end
	wait(0.25)
until game.Workspace.GameEnded.Value == true

its pretty messy but it works and i dont wana note it so good luck :slight_smile:

1 Like

there is 1 other script but its 3 lines of code… it just takes the plrs health

1 Like

I dont think this is the best it could be but i dont feel like working on it anymore :slight_smile:

Thanks for the help everyone!!!

1 Like