Game Development Community

Dynamic Fields associated with Camera or Scene Graph

by W. Wood Harter · in Torque Game Builder · 11/06/2007 (2:34 pm) · 3 replies

This took me some time to find and I didn't find it when searching so I thought I would post it here.

I added some dynamic fields to the scene graph. The dynamic fields available when no object is selected. I'm hoping to get this information on a level by level basis to configure some internals about each level. I then tried a number of ways to access those dynamic values and had trouble.

You have to open Scene Graphs Scripting tab and give the scene graph a name. In my case is used

levelData

One of my fields is startLocX, which I could then access with:

echo ("startX =" SPC levelData.startLocX);

Hope that helps someone. I tried to use a topic with keywords I searched for.

#1
11/06/2007 (2:47 pm)
I think you could have also used:

echo( sceneWindow.sceneGraph.startLocX );

I think the name of the default scene window is "sceneWindow" and "sceneGraph" is a dynamic field within that object referencing the main scene graph.
#2
11/06/2007 (4:17 pm)
That doesn't work. I found that the default scene window is actual sceneWindow2D, but that doesn't work either.
#3
11/07/2007 (8:22 am)
Echo( sceneWindow2D.getSceneGraph().startLocX );