Game Development Community

Custom component

by Devboy · in Torque X 2D · 01/18/2007 (3:48 pm) · 3 replies

Hi,

Trying to create a new custom component.

So I have a class that derives from TorqueComponent. What's next?

Do I need to add the component into componentSpecs.ed.cs manually or is TGBx supposed to do that when I "Import existing game studio express project"?

How is anything bound from my custom component? Do I need to write the relevant torque script (AddField etc)?

Besides the overview, is there anything resembling a tutorial?

Cheers,
Ira

#1
01/18/2007 (5:34 pm)
You have to add the component to componentSpec.ed.cs manually as you suspected. Check out those script files in the included projects to get an idea of the syntax.

I don't think there are any tutorials out there yet. Maybe check over at http://www.torquexengine.com/

#2
01/18/2007 (6:54 pm)
@Ira - Not much for tutorials yet. If you want to set things to your custom component through TGBX, then yes, add them to componentSpec.ed.cs and look at the TankBuster demo to see how to include things that you can select and options you can set on the component through TGBX.

If you get stuck, just paste what you're trying to do and we can help!

#3
01/18/2007 (11:32 pm)
Cool,

Thanks y'all