Another screen shot question
by GarageGamer · in Torque Game Engine · 11/15/2004 (9:50 am) · 10 replies
In earlier versions of the TGE, I was able to take a screenshot, store it in one of the ui directories, and reference it to be placed as a graphic on a gui.
This is essential to my game play, as we are creating an educational game along the lines of PokemonSnap. The players take pictures of different creatures in our forest, and compile a scrapbook, and are given a score based on how many species they "capture".
I did not have a problem with this in earlier versions, but since screenshot was incorporated into 1.3, it works a little differently.
I am no longer able to reference images in the current $pref::Video::screenShotSession, even though it does show up in the designated directory during that session. Once I quit the game and restart a new session, these files are available, but that doesn't really help.
Any comments, ideas, etc., would be appreciated
Thanks
GG
This is essential to my game play, as we are creating an educational game along the lines of PokemonSnap. The players take pictures of different creatures in our forest, and compile a scrapbook, and are given a score based on how many species they "capture".
I did not have a problem with this in earlier versions, but since screenshot was incorporated into 1.3, it works a little differently.
I am no longer able to reference images in the current $pref::Video::screenShotSession, even though it does show up in the designated directory during that session. Once I quit the game and restart a new session, these files are available, but that doesn't really help.
Any comments, ideas, etc., would be appreciated
Thanks
GG
About the author
#2
setModPaths(getModPaths());
tell the ResourceManager about the new files? That's what I do after saving the screenshot and it works fine. Although I can't find a way to save in directory that I want. By default it stores the screenshot in the "example" folder.
Nick
11/15/2004 (11:20 am)
Doesn't this command:setModPaths(getModPaths());
tell the ResourceManager about the new files? That's what I do after saving the screenshot and it works fine. Although I can't find a way to save in directory that I want. By default it stores the screenshot in the "example" folder.
Nick
#3
11/15/2004 (2:31 pm)
That definitely looks like a command that would make the resource manager rescan the available files. Thanks, Nick! :)
#4
For example instead of "screenshot_"@blahblahblah
use "common/ui/screenshot_"@blahblahblah
and it will save to the common/ui directory
just remember it's starting from the example folder...
btw, where should I implement the setModPaths command?
GG
11/15/2004 (4:40 pm)
To save to the directory you want, you just have to add the path to the head of the file name in the screenshot.cs fileFor example instead of "screenshot_"@blahblahblah
use "common/ui/screenshot_"@blahblahblah
and it will save to the common/ui directory
just remember it's starting from the example folder...
btw, where should I implement the setModPaths command?
GG
#5
As long as it's after the new file has been created and before the place you want to reference it, it's ok.
Thanks for the help on the directory! Isn't it amazing how we all learned something? :)
Nick
11/15/2004 (10:54 pm)
You can insert the command right after you save the screenshot, before you want to reference it, or anywhere in between.As long as it's after the new file has been created and before the place you want to reference it, it's ok.
Thanks for the help on the directory! Isn't it amazing how we all learned something? :)
Nick
#6
That worked perfectly... Thanks Nick!
GG
11/16/2004 (4:38 am)
Yes, it is cool how these forums work out, isn't it?That worked perfectly... Thanks Nick!
GG
#7
Thanks,
Ed
11/16/2004 (12:52 pm)
Would this technique work to allow the Mission Editor to "refresh" its list of available files for create mode. For example, I have starter.fps running and I create a new .DIF file in the data directory - will this allow the Mission Editor to see the new file?Thanks,
Ed
#8
I'm sure there is another way though. Anyone else knows?
Nick
11/16/2004 (11:28 pm)
Well, I just tried it and it didn't seem to work for the Mission Editor.I'm sure there is another way though. Anyone else knows?
Nick
#9
The Editor WOULD work like that if it were not constructed badly. Without having to rework a lot of stuff, you could just type "Creator.init();" into your console after you added the new .dif file and it should make the new file available to you without having to restart.
11/17/2004 (4:03 am)
Quote:
Would this technique work to allow the Mission Editor to "refresh" its list of available files for create mode. For example, I have starter.fps running and I create a new .DIF file in the data directory - will this allow the Mission Editor to see the new file?
The Editor WOULD work like that if it were not constructed badly. Without having to rework a lot of stuff, you could just type "Creator.init();" into your console after you added the new .dif file and it should make the new file available to you without having to restart.
#10
11/17/2004 (6:04 am)
Thanks for the tip! I'll try it...
Associate Kyle Carter