Run functions with the same name

Recommended Posts

Hello dear community. Today I wanted to create a multi room script. However, I have realized that might could be an easy way to make something similar like copy and paste to use almost the whole code as template but on different files. (ON THE SAME RESOURCE BUT DIFFERENT FILES)

Here goes my question. Could I run the function from one file just changing a VARIABLE VALUE?.

I would like that you explain me whats the best way to reach and optimize result without using different names for functions, events ..etc The code is going to be so long, thats why I wont to start yet.

NOTE: The script looks the same 2 times due to I just change the variable 'currentArena'. Read it carefully please.