Game Development Community

T3D1.2: Converting ConsoleMethod to DefineEngineMethod

by Gibby · in Torque 3D Professional · 01/29/2012 (8:10 am) · 22 replies

Greets all...

I'm trying to update some exisitng source code to T3D 1.2 as well as writing new code, and want to change all instances of the soon-to-be-deprecated ConsoleMethod to DefineEngineMethod. Can anyone explain the differences in the format of the two, and how to convert?

Thanks in advance...
Page«First 1 2 Next»
#21
02/15/2015 (1:04 am)
Actually, most of the conversion work on that score seems to have been ConsoleMethod to DefineConsoleMethod, though the two systems do seem very similar indeed... You'll find the specific commit alterations github.com/GarageGames/Torque3D/pull/1072/files
#22
02/15/2015 (1:50 pm)
DefineEngineMethod/DefineConsoleMethod is the new-style binding helper which allows you to bind functions with automatic type conversions, much like most modern binding libraries. DefineConsoleMethod only exists in the console system, while DefineEngineMethod also has a binding to the engine API (this is however IMO mostly useless except perhaps for generating docs).

ConsoleMethod/ConsoleFunction are the old-style binding methods. They don't perform any type conversions, you just get an argv[] list of function parameters straight from the console stack. The only advantage is they can handle a variable number of parameters which is useful for stuff such as echo.
Page«First 1 2 Next»