Game Development Community

TGB-Pro - SimGroups / SimSets Custom Functions

by Rodney Rindels - Torqued · in Torque Game Builder · 06/21/2006 (10:53 am) · 1 replies

First off , we need to identify is this is a bug or behavior expected to be in TGB-Pro.

The issue is assigning custom TS Functions to SimGroup and SimSets.

See: www.garagegames.com/mg/forums/result.thread.php?qt=46172

But to summarize, you should be able to (In my opinion) assign custom functions to SimGroups and Simsets so you can group like behavior to groups without trunking them to the superclass. I have workarounds of course, but it would seem this is not consistent behavior with the other descendants of SimObjects. (Which dont allow this behavior either which I find odd.)

Can Somebody shed some light on if this was designed like this, or a bug?

Thank you for any clarification you can add.

Rodney

Update: Well I guess its not a bug. damn. Ohh well Time to implement my own TS object class. No biggie. Was just hoping the Object system would be more consistent on all objects that derived from SimObject. If somebody that knows why reads this , could they explain "why" this was a "design" feature?

#1
06/22/2006 (10:09 am)
I k now what you mean, in fact tested this not long ago and realized that SimGroups and SimSets don't have namespace linkage quite like other objects. my solution was to simply do something like this:

new ScriptObject(ScriptOBJ);

ScriptObj.set = new SimSet();

so now I can link functions to the "ScriptOBJ" namespace and store objects in the set referenced in .set.

This really doesn't seem to be a wo rkaround as much as using the objects for there intentions. Since the group and set objects really are meant to store objects and not be a namespace for functions.