To share a lua script or not to share
Posted: January 23rd, 2013, 5:29 pm
I have 2 skins that are not variants and may or may not be active at the same time. Each has a need for handling some of the functionality within a lua script and will also share some common lua functions.
Question 1: should I / can I use a single lua script for both of these skins?
Question 2: if I share the script, are the 2 skins able to share lua variables within the script. Example if the lua script Initialize sets a Variable ABC=1 and then Skin 1 calls a lua function to change ABC=2, if Skin 2 checks that value, will it be 2 or still 1?
I hope that makes sense.
Thanks
k
Question 1: should I / can I use a single lua script for both of these skins?
Question 2: if I share the script, are the 2 skins able to share lua variables within the script. Example if the lua script Initialize sets a Variable ABC=1 and then Skin 1 calls a lua function to change ABC=2, if Skin 2 checks that value, will it be 2 or still 1?
I hope that makes sense.
Thanks
k