Let me try it out, guys, thanks
Edit: Does not work
After tracing the console, this is what it gave me:
Entering ConsoleEntry::eval()
==>servercmdobjtest();
Entering servercmdobjtest()
Add-Ons/Script_Wiremod/server.cs (5): Unable to find object: '' attempting to call function 'getEyeVector'
BackTrace: ->ConsoleEntry::eval->servercmdobjtest
Add-Ons/Script_Wiremod/server.cs (6): Unable to find object: '' attempting to call function 'getEyePoint'
BackTrace: ->ConsoleEntry::eval->servercmdobjtest
Leaving servercmdobjtest() - return 0
Leaving ConsoleEntry::eval() - return
And I didn't change anything in the script:
function servercmdobjtest()
{
%scale = vectorScale(%obj.getEyeVector(),100);
%ray = containerRaycast(%obj.getEyePoint(),%scale,$Typemasks::fxBrickObjectType);
if(isObject(firstWord(%ray)))
{
%brick = firstWord(%ray);
echo(%brick.getPosition());
}
}
Also, Death, look in the Torque Appendix or type DumpConsoleFunctions(); into the console and save as a text file.