View Full Version : Tailor System

09-26-2007, 05:42 AM
Here is a tailor system I made....
This is the first thing I have posted in the code gallery. :P
I know my style of scripting is...not as effecient as it can be, but thats how I learned, so...yeah.
Feel free to use this, change it, edit it, do w/e.
Just at least give me some credit....

Sorry its in an attachment,....but it wouldnt let me post it all. =/

09-26-2007, 06:01 AM
Near the bottom where you declared the variable "this.t" that would be better off being a temporary variable as it doesn't need to exist beyond that function.

Also the multiple if checks is ridiculous when you could have made it much easier on yourself by tokenizing the players chat and then using switch and case statements.

This isn't what I would expect from someone who supposedly was to be given a chance at GST. >_>

09-26-2007, 07:57 AM
tailor_inp1.text = this.t[0];
tailor_inp2.text = this.t[1];
tailor_inp3.text = this.t[2];
tailor_inp4.text = this.t[3];
tailor_inp5.text = this.t[4];

Stuff like this could easily be using a for() statement... as for chat commands, you should at least be doing if, else if, else if etc or, as Stan pointed out, a switch statement.

Mark Sir Link
09-26-2007, 02:15 PM
also, shouldn't GUI components use
position = {x, y}
or "x y"

and extent = {l, w}
extent = "l w"
instead of
x =, y =, width, height/

09-27-2007, 12:16 AM
Ok, I told you, my scripting isnt as effecient. -.-
I know I could have done a for() on the tailor text or w/e.
And I know I could have done a tokeninze on the players chat, but I didnt because I didnt think I was going to keep the color setting commands.
They were temp, and I just didnt remove them.

09-27-2007, 01:09 AM
Nice job, buddy! Keep it up! Work on a few of the things mentioned in this thread :)

09-29-2007, 05:12 PM
extent = {w, h} and position = {x, y} should be used. position = "x y" only works for compatibility with Torque GUI script. And the width, height, x, and y exist for compatibility in Graal, but they're really just reflections of position and extent.