Toribash
Originally Posted by 13chillz View Post
but do you actually know how cool this is? its basically like an auto in game previewer. Don't judge the code, its spaghetti and it works is all i know...

a code:
//Check if a document is open 
if ( documents.length > 0 )
{

var docRef = app.activeDocument;
var custompath = "/Games/Toribash-5.2/custom/#/"; //save path
var savepath;

var tgaSaveOptions = new TargaSaveOptions();
tgaSaveOptions.alphaChannels = true;
tgaSaveOptions.rleCompression = false;
var width = docRef.width.as("px")
var height = docRef.height.as("px")

var tbTexture = docRef.name.substring(0, docRef.name.indexOf('.'));


savepath = custompath + tbTexture + ".tga";
displayDialogs = DialogModes.NO;

docRef.saveAs(new File(savepath), tgaSaveOptions, false, Extension.NONE);

file = null;
tgaOptions = null;

}
else
{
alert( "You must have a document open to save!" );
}

-----
lets keep it scrappy until a good idea is on the table so we dont waste time


I know am not in but i just want to say that, that nose is too long