• Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at \$59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!

### #ActualGambini

Posted 17 March 2013 - 10:56 AM

You can wrap all of the <scripts> tags with

return function() <scripts> contents end

when you load them, and set the function environment for those. If you are using 5.1, then getfenv and setfenv are what you are looking for. If you are using 5.2, then the function will have an _ENV variable. I haven't used them myself, so I can't really get any more specific, but maybe that will help direct your search.

### #1Gambini

Posted 17 March 2013 - 10:55 AM

You can wrap all of the <scripts> tags with

return function() <scripts> contents end
when you load them, and set the function environment for those. If you are using 5.1, then getfenv and setfenv are what you are looking for. If you are using 5.2, then the functions will all have an _ENV variable. I haven't used them myself, so I can't really get any more specific, but maybe that will help direct your search.

PARTNERS