Basic Cubescript: Variables
#48
[cubescript]
alias manual_crate [

equalize 0 //level the floor first
loop i $arg1 [ editheight 0 1 ] //raise cubes $arg1 times

if ( > $numargs 2 ) [ //at least three arguments
settex $arg2 0 //assign floor texture
settex $arg3 1 //assign wall texture

][ //less than three arguments
settex $arg2 0 //assign floor texture
settex $arg2 1 //assign wall texture
]
]

// manual_crate (crate height increase) (texture to use for floor, and/or wall if third argument is not provided) ( optional: texture to use for wall )
[/cubescript]

That's an example of what I meant. I tested it, too. Works well. The name's weird but I didn't want to overwrite your function cause I wasn't sure exactly how it was supposed to be used as in:
Quote:It uses a few proto-scripts to get it started, though, which would make the process easier.
I'm guessing you call it in some automatic fashion. I just did it a little different so you could call the function yourself directly.

Also, great work on tools.cfg nonetheless. I have a pretty good idea, though it looks like your work is already quite extensive o_O

edit:
I typed /echo (selx) (sely) (selxs) (selys) and it outputs 0^some_number four times. The last two appear to be the selxs and selys but I couldn't find out the relation of the first two numbers and the x/y I had selected on the map.

append:I don't know what those numbers mean :P
Thanks given by:


Messages In This Thread
RE: Basic Cubescript: Variables - by V-Man - 28 Nov 11, 10:38AM
RE: Basic Cubescript: Variables - by V-Man - 28 Nov 11, 09:06PM
RE: Basic Cubescript: Variables - by V-Man - 29 Nov 11, 12:44AM
RE: Basic Cubescript: Variables - by V-Man - 29 Nov 11, 05:41AM
RE: Basic Cubescript: Variables - by V-Man - 30 Nov 11, 05:30PM
RE: Basic Cubescript: Variables - by V-Man - 01 Dec 11, 03:50AM
RE: Basic Cubescript: Variables - by tempest - 01 Dec 11, 03:17PM
RE: Basic Cubescript: Variables - by V-Man - 02 Dec 11, 12:55PM
RE: Basic Cubescript: Variables - by V-Man - 03 Dec 11, 07:37AM
RE: Basic Cubescript: Variables - by Bukz - 03 Dec 11, 01:11PM
RE: Basic Cubescript: Variables - by V-Man - 04 Dec 11, 06:43AM
RE: Basic Cubescript: Variables - by V-Man - 04 Dec 11, 11:21PM
RE: Basic Cubescript: Variables - by Felix-The-Ghost - 05 Dec 11, 12:17AM
RE: Basic Cubescript: Variables - by V-Man - 05 Dec 11, 10:37AM
RE: Basic Cubescript: Variables - by V-Man - 12 Dec 11, 10:27PM