#should i use module scripts for moves, abilities, races, weapons, etc. ?

1 messages · Page 1 of 1 (latest)

fading pecan
#

Im trying to learn the basics of how to structure my code. I want abilities to be unlockable based on requirements. How can I chexk for these traits (requirements) and apply the module script when a condition is met?

dense maple
subtle smeltBOT
#

studio** You are now Level 1! **studio

dense maple
#

You could have one big module script with requirements, data and functions all in one for abilities or you could separate it into one for data and one for function

#

Something like this

#

The data module for requirements, cooldowns, mana drain etc, and the modules in the abilities folder can hold effects and objects used for the ability and also functions for the abilities aka the abilities code!

#

And you can do similar things for armor and weapons

fading pecan
#

thanks so much bro thats super helpful

#

could you explain the difference between abilityData and fireBall scripts?

#

like just a summary of whats in them, not the script itself

jade sinew
#

or you can use a completely different arrangement of modulescripts that suits your needs

#

there's almost always an infinite number of ways to do things, and it's up to you to decide 👍

fading pecan
#

i gotchu

#

like i could just put all that in one script if i wanted to

#

but it would be less organized

jade sinew
#

but better to use modulescripts to break it up into more manageable chunks