Game Development Community

Getting access to the t2dSceneWindow?

by Vern Jensen · in Torque Game Builder · 06/19/2006 (3:54 pm) · 3 replies

The shooter tutorial has you hard-code values for the World Limits, when it seems I should be able to load these at run-time from the t2dSceneWindow. When nothing is selected in the editor, the Edit tab seems to show the properties for the t2dSceneGraph object. The problem is, the methods for getting the Camera's width, height, and location are in t2dSceneWindow, not t2dSceneGraph. So even though I've named my t2dSceneGraph so I can access it from scripts, it doesn't have any methods for getting size and/or location.

How do I get a reference to the t2dSceneWindow (not Graph), so I can at run-time dynamically determine the World Limits for my objects?

-Vern

#1
06/19/2006 (4:16 pm)
The default t2dSceneWindow is named sceneWindow2D

It is declared in /gui/mainScreen.gui, which is the first file exec'd in main.cs
#2
06/19/2006 (9:19 pm)
Sweet, thanks. Is that documented somewhere? (A list of all "Torque-defined globals" such as sceneWindow2D would be helpful.)

-Vern
#3
06/19/2006 (11:29 pm)
Maybe you should add that to the suggestions forum