Screenshot
by Fucifer · in Torque Game Engine · 06/16/2006 (12:32 pm) · 7 replies
Does anyone know where the code for what folder the screen shotsdrop in? Right now they drop in the example folder. I did search but come up empty unless I miss something. Thanks.
#2
06/16/2006 (1:13 pm)
Good heavens, I never realized that code was in there. Wow.
#3
From what I can tell, the screenshot directory isn't explicitly defined in any of the engine files. Instead, it looks like Torque saves them to the example folder by default. However, You can change that behavior by going to example\common\client\screenshot.cs, then locating this bit of script . . .
and replacing it with this . . .
Notice the only real difference is the addition of "./screenshots/" @ after the $name= stuff.
This isn't the code solution you asked for, but it still works. Using this method, though, you will need to make sure you have a screenshots forlder for your images to go into. :)
I hope that helps.
Aaron E.
06/16/2006 (1:42 pm)
Hi guys,From what I can tell, the screenshot directory isn't explicitly defined in any of the engine files. Instead, it looks like Torque saves them to the example folder by default. However, You can change that behavior by going to example\common\client\screenshot.cs, then locating this bit of script . . .
$name = "screenshot_" @ formatSessionNumber($pref::Video::screenShotSession) @ "-" @ formatImageNumber($screenshotNumber++);
and replacing it with this . . .
$name = "./screenshots/" @ "screenshot_" @ formatSessionNumber($pref::Video::screenShotSession) @ "-" @ formatImageNumber($screenshotNumber++);
Notice the only real difference is the addition of "./screenshots/" @ after the $name= stuff.
This isn't the code solution you asked for, but it still works. Using this method, though, you will need to make sure you have a screenshots forlder for your images to go into. :)
I hope that helps.
Aaron E.
#4
in void GameInit() add:
to create the screenshots directory automagically.
06/16/2006 (2:05 pm)
In game.ccin void GameInit() add:
Platform::createPath ("screenshots/");to create the screenshots directory automagically.
#6
06/16/2006 (2:47 pm)
Sweet, i was just wondering how to go about creating a folder!
#7
06/16/2006 (2:58 pm)
Thanks for the help. Aaron and Jeff your code together work perfectly. Thanks.
Torque Owner Tim Heldna
common/client/screenshot.cs
Somewhere in there I imagine. This is my last post before I go to bed so I haven't checked, just running off memory.