Game Development Community

Package constructor

by Aditya Kulkarni · in Torque Game Builder · 12/19/2009 (2:06 am) · 1 replies

do the packages support constructors?

i tried giving a function the same name as the package, but that doesn't work...and the documentation (http://tdn.garagegames.com/wiki/TorqueScript_Quick_Reference_2#package) doesn't say anything about them...

#1
12/19/2009 (11:04 am)
if you talk about packages that are used to bundle functions in a replacable way, then no, there aren't any constructors.
Those packages aren't objects that you create.

You decide which one you make active and the functions in there will be called if a function of the given name is used.
So they are more like a function mapping / function pointer grouping mechanism