Game Development Community

How to add code in T2D source

by William Liu · in Torque Developer Network · 02/18/2006 (7:51 pm) · 2 replies

We are newers Torque2D.
We bought Torque2D last year.
Now,we feel puzzled, we have some question as follows:

1. We need control ourself game logical by adding code in soure of T2d instead of
script,then we think call our function by script, but we do not know how
to add our code in soures of T2D, how to call it by script, can you help me?
2. We want to know something about T2D which can support low-level in network, such as IP, TCP, UDP and so on.
Looking forward to your replying!

#1
02/18/2006 (9:12 pm)
Here is basically what you need to do:

look at the console.cc source file

inside there, you will see a list of the console functions, such as exec() and such.

all you need to do is copy the function, and rename it and customize it as you want. When you recompile, that function will be accessable via script.

hope this helps. if someone else has better info, please post (i dont have source code with me right now)
#2
02/25/2006 (2:47 pm)
Please note that this is a forum for discussing writing documentation on TDN - NOT a general Torque problem solving forum! Please use the appropriate forums for your product to discuss problems.