Creating object functions
by Rarw Muffinz · in Torque 3D Beginner · 04/29/2014 (3:58 pm) · 1 replies
Hey guys, sorry for the noob question but I want to know how I can define a variable to be called on an object, such as "%client.myFunction();".
Can someone help?
Thanks,
Rarwmuffinz
Can someone help?
Thanks,
Rarwmuffinz
Torque Owner Robert Fritzen
Phantom Games Development
If you're referring to object functions in torque-script in general the syntax is as follows:
function ClassName::functionName(%classObject, %args, ...) { } //Where %classObject is the object of the contextC++ is a little more tricky to accomplish and it's along the lines of:
DefineEngineMethod(ClassName, functionName, return_type, (argument list), (default arguments), "function description") { //code here. }