Game Development Community

Help with Objects

by Charlie Malbaurn · in Torque Game Engine · 07/25/2004 (3:11 pm) · 5 replies

Hey all,
I have a quick question.
When reviewing the chapter 3 code, I noticed that on page 108 Ken set %shape= new Item(). No problem understanding that. Later on he sets shape.setTransform("90,blah, blah blah).

What I am not understanding is where the .setTransform function is coming from. In the script reference on page 733 I see the Item class and its subclass listing, but I don't see any settransform. and on the console dump for the classes I don't see it there either. The next place I find it is in the sceneobject class.
Can someone explain to me how to find the functions and methods related to a class? It seems kind of odd that there not listed anywhere, or atleast anywhere that I can find. How do people find these things on there own?
Thanks for the help.

#1
07/25/2004 (3:28 pm)
SetTransform is part of the Public Member Functions of Item. Not sure why you are not seeing it with a .dump, but being the function call works you know it must exist for that "class"

As far as "How do people find these things on there own?", if you owned the SDK there are some docs you can look. (I looked up Item and it was listes there) Without the engine, the book you have is a good one as well as searching the resources/forums here at GG.

Hope that helps.
#2
07/27/2004 (11:49 pm)
Yeah it does somewhat. I'm not sure why it's not showing up on my dump. I am currently working on a script editor so i need to make sure i have all the pre-built functions and classes in there for the auto complete to work.
AS soon as i flush out some of the major parts, I'll throw out a Call to Arms to get down to the root of the problem.
Thanks for taking the time to answer me
#3
07/29/2004 (3:15 pm)
Every class has all the members of its parents in addition to its own.
#4
07/30/2004 (8:16 pm)
Thanks ben!
#5
08/15/2004 (8:22 pm)
Hate to rehash this thread from the dead but I've come across a couple of things that I'm having a hard time with.
The main one being this:
In chapter 4 on page 144 Ken creates PlayerInterface with the command
new GameTSCtrl(playerinterface);
profile="guicontentProfile"
Blah blah blah
:
Then later creates a function PlayerInterface::onwake(%this)

Now I'm having a hard time understanding where the GameTSCtrl object is. I don't see it listed in the objects in the appendix. And also what is the profile?
Second, and the real killer... I assume that the onwake is a custom function that belongs only to Playerinterface but where is it called? Is it called automatically or can it be used at a later time like playerinterface.onwake()?
I realize this is probably a stupid question but the only thing I really picked up about :: was that it was for namespaces.

Onelast thing. Server::missionfilespec="*/missions/*.mis;
Now i checked a thread on the list of preferences variables and did not see this one located anyhwere. Also im confused with the use of */missions/*.
ok I found out that */missions/* is to locate the folder to look at. But does that mean that
Server::missionfilespec is a userdefined variable or is it system?