Help in understanding methods
by Areal Person · in Torque Game Engine · 08/08/2006 (8:08 am) · 1 replies
Could someone please explain the class model for fireing events in general terms ? What I mean is, for example In Player.cc there is a method called Player::OnAdd but in the class plublic member function
document there is no reference to the method. Why ?
I can't figure out what methods are User Defined in script and which ones are stock TGE.
I need just a very general understanding of the way the event model fire's
For example...
Player.cs ::OnCollision -> Crossbow.cs (Object collision) -> weapon.cs ::onPickup
Player.cs ::OnCollision FIRES -> weapon.cs ::onPickup
Crossbow.cs (Object collision) -> FIRES Player.cs ::OnCollision
This shows the event fireing cycle. for onCollision & onPickup, what about the others.
Should I just do the Gruntwork then plublish the doc's on TDN ?
Or somthing kinda like that, can anyone help ?
Thanks,
document there is no reference to the method. Why ?
I can't figure out what methods are User Defined in script and which ones are stock TGE.
I need just a very general understanding of the way the event model fire's
For example...
Player.cs ::OnCollision -> Crossbow.cs (Object collision) -> weapon.cs ::onPickup
Player.cs ::OnCollision FIRES -> weapon.cs ::onPickup
Crossbow.cs (Object collision) -> FIRES Player.cs ::OnCollision
This shows the event fireing cycle. for onCollision & onPickup, what about the others.
Should I just do the Gruntwork then plublish the doc's on TDN ?
Or somthing kinda like that, can anyone help ?
Thanks,
Associate Anthony Rosenbaum
%pl = new player() { datablock = someplayerDatablock; };
then you can manipulate the player with its or its parent classes consolefunctions.
For instance in player.cc look for functions starting with consoleFunction they will describe the function name and parameters.
An alternative more script friendly way is dumping all the object's functions to the console
in the example above I could do
%pl.dump();
YET AGAIN ANOTHER way to have ALL the classes and their functions dump to the console is to type
dumpConsoleClasses()
AND
dumpConsoleFunctions()
Goodluck