This episode we are actually filling a script request! In this tutorial we cover how to alias methods. How to define modules and call them and generally how to configure your script to not conflict with others while adding the ability required for the script you are doing.
Just a bit curious, if you plan on using numbers as the key, why not just use an Array?
No offense, just seeing if there is a specific reason or a speed difference or whatnot.
GameGuysProjects 10 months ago
@GameGuysProjects
Being that we dont know that all weapons should change the class we cannot assume that the index will match the order in which you enter the 'weapons'. Allowing you the ability to have a 'key' to the results is a much more clean method for reading the code, but it is less efficient when compared to normal array. Management wise, it is better to follow as I did, but if you can do it otherwise, then great. Saving a milisecond is not a huge concern to me.
gubid 10 months ago
@gubid Ah yes thank you. I would've simply checked to see if the index existed or not and went from there. Thanks for the reply.
GameGuysProjects 10 months ago
@GameGuysProjects
You would have had to fill the index on creation or something to ensure that every weapon had a place holder and that the index associated could relate back via ID.
Thanks for commenting!
gubid 10 months ago