698 Appendix A ■ The Torque Game Engine Reference
IsKoreanBuild()
Parameters: none
Return: string
Description: Korean registry key checker.
Usage: %kb = IsKoreanBuild();
IsObject(handle)
Parameters: |
handle |
Handle of supposed object. |
Return: |
numeric |
1 = true, 0 = false. |
Description: |
Queries if handle is an object. |
Usage: |
%status = IsObject(%chopper); |
IsPackage(name)
Parameters: |
name |
String containing the name of the package. |
Return: |
numeric |
1 = true, 0 = false. |
Description: |
Queries if name is a registered package. |
Usage: |
%status = IsPackage(Show); |
IsPointInside(point)
Parameters: |
point |
"x y". |
Return: |
numeric |
1 = true, 0 = false. |
Description: |
Queries if point is coincident with the interior of any object. |
Usage: |
%status = IsPointInside("123 345 25"); |
IsWriteableFileName(filename)
Parameters: |
filename |
String containing full file name. |
Return: |
numeric |
1 = true, 0 = false. |
Description: |
Queries if file specified by filename is writeable. |
Usage: |
%result = IsWriteableFileName("/common/server/script.cs"); |
Torque Console Script Command Reference 701
MathInit(mode)
Parameters: |
mode |
The string specifier. Choices: |
|
|
"DETECT" |
|
|
"C" |
|
|
"FPU" |
|
|
"MMX" |
|
|
"3DNOW" |
|
|
"SSE" |
Return: |
nothing |
|
Description: |
Enables math extensions based on CPU type. |
Usage: |
MathInit("DETECT"); |
MatrixCreate(vector, angledvector)
Parameters: |
vector |
"x y z". |
|
angledvector |
"x y z angle". |
Return: |
string |
|
Description: |
Generates a matrix from the specified values. |
Usage: |
%mtx = MatrixCreate("10 10 30", "30 40 50 10"); |
MatrixCreateFromEuler (valstring)
Parameters: valstring "x y z".
Return: string
Description: Generates a matrix from given arguments.
Usage: %val = MatrixCreateFromEuler("5.5 90 200");
MatrixMulPoint(matrix, point)
Parameters: |
matrix |
|
point |
Return: |
string |
Description: |
Multiplies a matrix by a point. |
Usage: |
%mtx = MatrixMulPoint(%matrix,%point); |
706 Appendix A ■ The Torque Game Engine Reference
nextToken (str,token,delim)
Parameters: |
str |
Initializes tokenizer when set to a valid string variable. Uses an |
|
|
empty string ( "" ) to specify follow-up operation on the same |
|
|
string. |
|
token |
Reference handle to the variable that will receive the found |
|
|
token. Note: When passing a variable by reference to a |
|
|
function, such as with this parameter, you do not prefix the |
|
|
variable name with % or $. |
|
delim |
Specifies the character that delimits the tokens. |
Return: |
string |
Balance of the string after the found token. |
Description: |
Sets token to the next substring in str delimited by delim. The initial call to this |
|
function specifies str; subsequent calls to this function that operate on the same |
|
string must pass the empty string ( "" ). |
Usage: |
%str = nextToken("one,two,three", number, ","); |
OpenALInitDriver()
Parameters: none
Return: numeric
Description: Initializes the sound driver.
Usage: OpenALInitDriver();
OpenALShutdownDriver()
Parameters: none
Return: nothing
Description: Disables the sound driver.
Usage: OpenALShutdownDriver();
PanoramaScreenShot(filename)
Parameters: |
filename |
String containing file name. |
Return: |
nothing |
|
Description: |
Captures the panoramic screen view and saves it to the file specified by filename. |
|
The engine will take the panoroma shot as a sequence of three screen captures, |
|
looking left, center, then right. |
Usage: |
PanoramaScreenShot("myPanorama"); |
|
|
Torque Console Script Command Reference |
707 |
|
|
|
|
|
pathOnMissionLoadDone() |
|
|
|
Parameters: |
none |
|
|
Return: |
nothing |
|
|
Description: |
Sets the Mod path that will be active when a mission is finished loading. |
|
|
Usage: |
pathOnMissionLoadDone("missE/mission"); |
|
|
|
|
|
|
PermDisableMouse()
Parameters: none
Return: nothing
Description: Permanently disables DirectInput polling of the mouse device.
Usage: PermDisableMouse();
PlayDemo(filename)
Parameters: |
filename |
String containing file name. |
Return: |
nothing |
|
Description: |
Plays back a demo saved in filename. |
Usage: |
PlayDemo(MyNiftyDemo); |
PlayJournal(name,[break])
Parameters: |
name |
String containing file name of journal. |
|
break |
If true, then stops playback after each event. |
Return: |
nothing |
|
Description: |
Plays back saved journal specified by name. |
Usage: |
PlayJournal("myjrnl.jnl"); |
PrevResolution()
Parameters: |
none |
|
Return: |
numeric |
1 = success, 0 = fail. |
Description: |
Decreases next highest resolution. |
Usage: |
%result = PrevResolution(); |