Game Development Community

Running Torque from a Visual Basic project

by Ian Omroth Hardingham · in Torque 3D Professional · 11/16/2010 (3:00 pm) · 2 replies

Hey guys.

I am running the T3D dll from a Visual Basic application.

This works just fine with a compiled VB app, but when I run the project within VB the getModuleFileName function returns VB.exe's location, and not the main game dir's location.

I have tried replacing getModuleFileName with getCurrentDirectory, which appears to work (it gives the right dir) but success = str.open(defaultScriptName, Torque::FS::File::Read); still fails, and I can't work out why.

Can anyone help?

Thanks,
Ian

#1
11/16/2010 (6:10 pm)
Are you calling that within your VB app or in TorqueScript? It doesn't look like the TS open command. Does the VB side have access to the "Torque::FS::File::Read" var?

I'm curious about how you are using the T3D dll in a VB app. Is this to provide a VB-designed UI? How would you use that? It may make a great resource if you are willing to share. I would love to be able to design most of my UI in Visual Studio and leave Torque to handle the 3D. Torques UI controls are a little inconsistent in how they apply profiles and they also lack a number of basic (expected) features.
#2
11/16/2010 (7:01 pm)
Rex, that is code within Torque which is called a ways down the process.

This is a very specialised application which basically has a VB app use Torque for external rendering - it's not really suitable for anything else I'm afraid.