Game Development Community

Checking to see if its in a ZIP

by Glenn Bermingham · in Torque 3D Professional · 02/11/2014 (7:06 pm) · 2 replies

I'm currently in the process of making a simple mods/addon system for my game and I'm wondering if Torque 3D has any way to check to see if an object/script/anything is in a zip. I'm aware that you can execute scripts in the zip's as if it was a root folder.

Is their also a way to treat a ZIP file like a folder rather than acting as if it was a root folder in the game directory?

Example,
exec("mods/zip/client.cs");

Currently that would put the client.cs (In the engines mind) in the root game folder and wouldn't execute. exec("client.cs"); Would however work.

I'm still fairly beginner at coding and Torque Script, Pseudo code would really help me out.

#1
02/11/2014 (8:30 pm)
I uncomment #define TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP in Torque3D/My Projects/projectname/source/torqueConfig.h when I use zip files. When trying to exectue your file, a file path like mods/zip/client.cs, mods.zip/zip/client.cs, or mods/zip.zip/client.cs would work.
Edit: To clarify, I am talking about the actual filepath. You wouldn't need to change the function.
#2
02/12/2014 (12:08 am)
Thanks, that solves one of my problems!