Game Development Community

TorqueScript questions

by Paul Jack · in Torque Game Engine · 01/06/2007 (4:41 am) · 1 replies

1. Are TorqueScript objects garbage collected?

2. In the following line of code:

moveMap.bind( keyboard, a, moveleft );

...what are three arguments (keyboard, a and moveleft)? Are they variables, constants, string literals, function literals, or some combination of those things?

Given a line like that in TorqueScript, how can I determine where the symbols are defined?

3. Is a datablock the same thing as a prototype in (say) JavaScript?

Thanks,

-Paul

#1
01/06/2007 (5:29 am)
1. No, not automatically (I've been spoilt by Java too)

2. Device (keyboard, mouse, joystick) / Action (input from device) / Command (function)
See engine/sim/actionMap class & header files for more information.

3. No. Here's some points that may help you understand what a datablock is:

- Datablocks are special objects that are used to transmit static data from server to client.

- A datablock is an object that contains a set of characteristics which describe some other type of object.

- A datablock is a(n) object that can be declared either in C++ engine code, or in script code ... Each declared datablock can then be used as a "template" to create objects...