#how do i better optimize my attacks?
1 messages · Page 1 of 1 (latest)
my first thought was moving the attacks so that they each have their own module script, but how would i access the functions and type definition in those
Have you tested it with other players to see performance or na?
Or was it obvious whike testing
not worried about current performance, its fine, moreso worried about how poor itd get later down the line when theres 30+ unique attacks
To be honest if you want it to be like that, You could just have one/two (depends on you) function(s) to call and let it handle the rest
although this is just my opinion on jt
elaborate as im confused on what you mean
something i would do in alot of things that can do allat but only needs to be called once, an example is like
--pretend this is a module
function bleh.Start(...)
end
-- pretend this one is another module
function bleh2.Start(...)
end
so i only need to call .Start(...) than suffering
although not sure if this is what u mean though
cause imnsleepy as fuck and im on mobile
local module:{attacka} = {
NOLM1 = {
size = Vector3.new(5,8,6),
offset = CFrame.new(0,0,-3),
damage = 20,
Cooldown = "M1",
CdTime = 2,
Chain=6,
onHit = function(Humanoid:Humanoid)
end,
},
}
this is what my current attack module script looks like
just with alot more than this one

all the data is then used by another script
lowk i think Pyro-Fire might be more helpful since im charliekirkeuinly sleepy and j cant understand SHIT on that

I just hope he aint sleepin rn
also ignore how some things are capitalized and others arent i cant seem to chose
only S2's and pissroles will yell at you for Casings
😔
i should really go through the code and change them all to the same casing tho lol
imagine someone else goes through this and trys calling OnHit because CdTime is capitalized like that lmao
or vise versa
(im that someone)
💔
the attack code in general is just a mess
mainly cuz its all running a function that was originally made just for hitboxes
maybe you need to seperate some of it dawgh imk
yea
split the hitboxes into their own thing, and redo the attack code so that its cleaner
cuz ive just been throwing everything in when ive needed it
optimize in terms of performance or organization?
organization