Author Topic: Easy way to set up an init.cs  (Read 2469 times)

Ok, so I was expirementing around with another game, and I found out the following:

Ok. Make a new init.cs, and place it in the folder you want it in.
Now open that init.cs, and put in the following code:
Code: [Select]
exec("./*.cs");This works with all script types for torque.

But like I said, you have to have the scripts you don't want running out of the folder with the easy init.cs, and another thing: this is not good if something needs to be executed in a certain order, as Badspot said.

This does work in RTB, I've tested it.

Easy for long exec lists!
« Last Edit: April 13, 2007, 05:16:23 PM by Miga »

Sweet I can use this for something that i'm not telling anybody about.

EDIT: Whats with the single quote, it returns a syntax error.
« Last Edit: April 13, 2007, 04:29:59 AM by Terror »

Badspot

  • Administrator
Could cause problems if you have things that need to be executed in a certain order.

Could cause problems if you have things that need to be executed in a certain order.

Hmm, Didn't think about that.

And I fixed the code to where it has the last quote. Thanks for pointing that out.
« Last Edit: April 13, 2007, 05:17:05 PM by Miga »

I find it easiest just to add an extra line into Main.cs. However, on occasion, a patch will overwrite it.