I’m currently in very early development for a Hero Shooter style game. I need abilities which are exclusive to certain characters. (e.g. Character1 will have abilities which Character2 will not, and vice versa. Examples include Marvel Rivals, and Overwatch.) I’m not sure where to start.
I’m using a simple Local Script for the activation of the ability (and obviously a remote event and server scripts etc. which will remain in ReplicatedStorage and ServerScriptService respectively), and I was wondering if there was some way I could assign this to the character? Or maybe have a value inside the character to determine if they can use it or not?
I’m not expecting you to code it for me, just for some help to find the direction I am looking for.
Thank you for your time!
i’m joking please don’t flag
anyway, my suggestion would be to have a module script (wherever that the client can see), that stores all characters and their parameters/abilities
idk metatables so i can’t really suggest them, but maybe some metatable nerd will come along
here’s an example:
local module = {
Character1 = {
name = "wow i have a name",
-- whatever else
},
Character12 = {
name = "wow i also have a name",
-- whatever
}
}
return module
to store functions inside modules, you can just do:
ability1 = function(parametersIfYouWant)
end,
this also means that you can have the same name for all the functions, but have different logic inside of them
so you can have: