Quick Execute

Author Topic: Quick Execute  (Read 4469 times)

Just a simple /command to execute scripts in your add-ons folder.
To execute the Gun weapon for example, type /exec weapon_gun, and it will automatically execute the client.cs and or server.cs in that zip file.

Download

What does executing scripts from your server essentially do?

It's for scripters. It just reloads the script so your game is up to date.

Oh I get it, that is useful.

Its good for testing edits to scripts/addons.
Now I wont have to restart the server every 10 seconds.

Edit: Might want to add a description of it's practical uses in the OP for people who don't know what this is.
« Last Edit: November 22, 2014, 03:29:25 PM by Mr.Noßody »

I will have to try this out. I always run into errors using console
Code: [Select]
exec("Add-ons/Addon_Name/file.cs");
Forcing me to basically
Restart the server every 10 seconds.
Anytime i make a simple script edit. Not so good on the video card

This is quite useful. Does it also deactivate packages created by the scripts?

I'm pretty sure things like this have been made before and failbinned because of the problems that loading add-ons mid-game cause



Not so good on the video card
What?


Does it also deactivate packages created by the scripts?
No, this is for loading add-ons, not unloading them
« Last Edit: November 22, 2014, 04:26:03 PM by Headcrab Zombie »

No, this is for loading add-ons, not unloading them
Would be cool if we had something for that too.
Like so we could register package_names to deactivate when we want to 'unload'/reload add-ons.

Would be cool if we had something for that too.
The most you can do is deactivate package and toggle any prefs coded in
You can't unload shapes/sounds, you can't unexec scripts, you used to be able to delete datablocks, but you can't do that anymore
Torque simply isn't made to unload (or load, for that matter) add-ons mid-game

Is it possible to have it tell you to check the console if the script has errors?

Is it possible to have it tell you to check the console if the script has errors?
Hint for OP: compile("path/to/file.cs"); will return false if the file contains errors/was not found


I will have to try this out. I always run into errors using console
Code: [Select]
exec("Add-ons/Addon_Name/file.cs");
discoverFile("Add-Ons/AddOn_Name.zip");
or
setModPaths(getModPaths());

before using exec with changed zip files

ofc i'm guessing this mod does one of those so w/e


discoverFile("Add-Ons/AddOn_Name.zip");
or
setModPaths(getModPaths());

before using exec with changed zip files

ofc i'm guessing this mod does one of those so w/e
Ahh thank you so much

absolutely amazing

« Last Edit: November 23, 2014, 01:08:24 PM by Czar »