Game Development Community

Includes in torquescript?

by Tim Lang · in Torque Game Engine · 07/20/2008 (1:40 am) · 3 replies

Couldn't find this anywhere,...

does anyone know if there's a way to do #include type behavior in torquescript? it would be nice to break out some of my ai script into a few smaller files to make it a little more manageable....

#1
07/20/2008 (2:09 am)
Exec("./your_script.cs"); ?
#2
07/20/2008 (9:59 am)
I thought about that, but normally when you #include something, it acts as though it were all the same script file. would an exec("blah"); function the same way?
#3
07/20/2008 (11:07 am)
It doesn't matter if the Methods are all in the same file, you just have to make sure that all the files get executed. So, if you put the exec() functions at the top of the main AI script files, exec("AIObjects/someSmallerObject.cs") is the equivalent of #include "AIObjects/someSmallerObject.h".