Game Development Community

Creating sub directories from Torque Script?

by Neil Marshall · in Torque Game Engine · 06/30/2006 (11:01 am) · 3 replies

Is it possible to create a sub directory from Torque Script?

I'm programming a level downloader which operates before the level loads and the files are coming across fine, unless I try to add a file to a sub directory which doesn't exist and then it fails.

#1
06/30/2006 (12:24 pm)
I am not intimately familiar yet with TorqueScript, but if it cannot be done yet it would be incredibly simple to implement as a C++ modification. That said, worth waiting to hear from someone else that might have a better idea of if that's already an available feature.

I have looked over here and I do not see a command to create a directory, though. Sounds like it's time for you to break out the ol' C++ compiler.
#2
06/30/2006 (12:42 pm)
Neil,

This isn't a script solution, but it might still help you out.

It came from Jeff White . . .

Quote:In game.cc

in void GameInit() add:

Platform::createPath ("screenshots/");

to create the screenshots directory automagically.

I hope this helps.

Aaron E.
#3
06/30/2006 (3:21 pm)
Excellent. If that createPath function works it shouldn't be too hard to expose to scripting or even better, just to build in to the file download code.