Game Development Community

Config DataBlock not showing up in editor

by David House · in Torque Game Builder · 09/03/2007 (6:36 pm) · 5 replies

I am trying to create a datablock and then assign to an object using the GUI. The problem is that nothing appears in the Config Datablock list. I can see the script containing the datablock being compiled & loaded, so I'm sure this isn't a simple problem like that.

The feature tutorial for Config datablocks doesn't work either. I'm thinking this is a 1.5.1 issue? Just want to confim if that is the case or not. I'm using a Mac in case that matters as well.

Any ideas or things to try?

#1
09/04/2007 (7:44 am)
Hi David,
I had the same question a little while ago:
http://garagegames.com/mg/forums/result.thread.php?qt=64591

I had been using custom data blocks with 1.1.3 then when I went to 1.5. The only answer seems to be out there is stuff everything into one file and call it datablock.cs and make sure it is inside of /game/gameScripts/
#2
09/04/2007 (1:25 pm)
Re: stuffing everything into one file
You can, in that game/gamescripts/datablocks.cs, write any script code you want. So you could do something like:
exec("./enemyDatablocks.cs");
exec("./physicsDatablocks.cs");
If you put this code outside any function, it will get run when datablocks.cs is exec'ed
#3
09/04/2007 (4:14 pm)
OK, putting the datablock into that cs file works. I figured there was a detail I was missing. I saw your post, but I think I didn't scroll all the way down to the bottom, or I just glossed right over that. I'm sure once the docs get fully updated for 1.5 this wont be a question down the road. Like your post, prior to 1.5 you could put the datablocks anywhere. Of course, with all the improvements to the Editor, this isn't a big deal once you know what is going on.

Thanks for the tips.
#4
09/04/2007 (5:54 pm)
Hey Spider, other than you used a ./ and I used a ~/ the code was the same thing and I could not get it to load the same was as I could in 1.1.3

Doing this:
exec("~/gameScripts/configDatablocks.cs");

Resulted in the datablock never running.
#5
09/04/2007 (6:46 pm)
exec( "./otherDatablocks.cs");

That seems to work for me just fine.