Right now, I’m making the stats for the abilities in my game, and I can’t decide on which one is better. Should I just set them or make a function to set them? ( or is there an alternative way to set the stats for the abilities?)
--DPH IS DAMAGE PER HIT
--CD IS COOLDOWN
-- THIS MIGHT BE INCORRECT BUT ITS JUST AN EXAMPLE
module.Data = {
create = function(table,name,event,dph,cd)
local new = {}
new.Event = event
new.DPH = dph
new.Cooldown = cd
table[name] = new
end,
}
module.Data:create('Bone Shot',game.ReplicatedStorage.Abilities.bone_shot,200,4)
--OR
module.Data = {
['Bone Shot'] = {DPH = 200,Event = game.ReplicatedStorage.Abilities} -- and so on.....
}
return module
I might be making a big deal out of this, but I really cant decide…