ScreenShot() parameters?
by Jason McIntosh · in Torque Game Builder · 03/26/2005 (9:41 am) · 7 replies
Anybody know the parameters for the screenShot() console function? I give it a filename and it says it's the wrong number of parameters. I guess I could dig through the source code, but starting Visual Studio to find documentation is shooting a squirrel with a cannon.
About the author
#2
03/26/2005 (12:41 pm)
That's odd, considering there's a property defining the default screenshot format (I think it defaults to "png").
#4
03/26/2005 (12:52 pm)
Thanks, Chris! :)
#5
In demoGame.cc line 15
ConsoleFunction(screenShot, void, 3, 3, "(string file, string format)"
"Take a screenshot.\n\n"
"@param format One of JPEG or PNG.")
# define ConsoleFunction(name,returnType,minArgs,maxArgs,usage1)
now according to www.garagegames.com/docs/torque/general/ch05s03.php#scripting.engine_interface.c...
"# Note: 1 is the minimum, because the name of the function is automatically passed as the first argument."
if you change it to..
ConsoleFunction(screenShot, void, 2, 3, "(string file, string format)"
you can use the function as defined in the "console docs" and it will default to PNG, or you can use it with 2 arguments.
03/26/2005 (1:00 pm)
Is this an error??In demoGame.cc line 15
ConsoleFunction(screenShot, void, 3, 3, "(string file, string format)"
"Take a screenshot.\n\n"
"@param format One of JPEG or PNG.")
# define ConsoleFunction(name,returnType,minArgs,maxArgs,usage1)
now according to www.garagegames.com/docs/torque/general/ch05s03.php#scripting.engine_interface.c...
"# Note: 1 is the minimum, because the name of the function is automatically passed as the first argument."
if you change it to..
ConsoleFunction(screenShot, void, 2, 3, "(string file, string format)"
you can use the function as defined in the "console docs" and it will default to PNG, or you can use it with 2 arguments.
#6
03/26/2005 (1:05 pm)
Nice, thanks for the heads up. :)
#7
*edit
This info is only shown in a debug build, not the release build.
03/26/2005 (1:35 pm)
Now my only question is why is the usage string not printed out, when the wrong # of argumets are passed.*edit
This info is only shown in a debug build, not the release build.
Torque Owner Chris Newman
-Used to take a screen shot and save it to file specified by filename
-No return type
screenShot("MyScreen");
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5718
console docs
but doing it that way gave me the same error.
screenShot("pic.jpg", "JPEG");
worked for me.