Pe/\/duluM Posted April 25, 2013 Share Posted April 25, 2013 I'm trying to create a training gamemode, like on TG. It is working so far, every script of the map get's loaded and started successful. But it fails at stopping it. Though there is no function to stop everything inside the whole loaded script (xy = loadstring(FILE_TEXT)) and not everything get's unloaded on nil-ling the loadstring variable, I wanted to ask if there is some other way to achieve loading and saving the scripts? Greetings, Pe/\/duluM Link to comment
50p Posted April 25, 2013 Share Posted April 25, 2013 Stopping the resource is the only way to unload scripts. Link to comment
Pe/\/duluM Posted April 25, 2013 Author Share Posted April 25, 2013 Mh... I already thought about doing one resource as a temporary script-cache, but if that one would get started, every player would get those scripts loaded... Link to comment
Fabioxps Posted April 25, 2013 Share Posted April 25, 2013 Mh... I already thought about doing one resource as a temporary script-cache,but if that one would get started, every player would get those scripts loaded... I sent you a pm Link to comment
Pe/\/duluM Posted April 26, 2013 Author Share Posted April 26, 2013 I still can't get the unloading to work... Though my method seems crap, cause (as I said) the music and stuff of all players would get restarted Link to comment
GTX Posted April 26, 2013 Share Posted April 26, 2013 viewtopic.php?f=91&t=56871#p549336 Link to comment
Pe/\/duluM Posted April 26, 2013 Author Share Posted April 26, 2013 I'm doing wrappers and all that kindof stuff already, but the functions still exist and run (e.g. flying meteors of Unseen Galaxy) Link to comment
GTX Posted April 26, 2013 Share Posted April 26, 2013 Put all objects into a table and then when you trigger an unload function, destroy them with destroyElement. Link to comment
Pe/\/duluM Posted April 26, 2013 Author Share Posted April 26, 2013 Objects get deleted fine, already did that. I said, the Functions are still running Link to comment
GTX Posted April 26, 2013 Share Posted April 26, 2013 You can't stop or delete a function. Link to comment
denny199 Posted April 26, 2013 Share Posted April 26, 2013 GTX, he don't know a way to unload the scripts what he has loaded with "loadstring" Link to comment
Pe/\/duluM Posted April 26, 2013 Author Share Posted April 26, 2013 GTX, he don't know a way to unload the scripts what he has loaded with "loadstring" Exactly that! Thank you denny ^^ But still, I don't know how to unload it correctly Link to comment
GTX Posted April 26, 2013 Share Posted April 26, 2013 As I said, do the wrappers. Show your code. Did you override addEventHandler too? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now