Getting C++ Pointer from Console Object ID?
by Sim9 · in Torque Game Engine · 04/02/2005 (2:49 pm) · 2 replies
Hi! I'm trying to get a C++ Pointer from an Object ID (from console).
For example:
So now in function makePath I have Object ID numbers, but I need to actually get at those objects to do anything worthwhile. Hopefully there's a function somewhere to get a pointer to that object, but I have not found it yet. (What I've been doing is looping through the simgroup to manually find the ID, but this is inefficent).
Thanks for any help you can lend, it would be greatly appreciated!
For example:
ConsoleMethod(WaypointMgr,makePath,void,5, 5,"Computes path from START to END on AIBOT")
{
object->makePath(dAtof(argv[2]),dAtof(argv[3]),dAtof(argv[4]));
}So now in function makePath I have Object ID numbers, but I need to actually get at those objects to do anything worthwhile. Hopefully there's a function somewhere to get a pointer to that object, but I have not found it yet. (What I've been doing is looping through the simgroup to manually find the ID, but this is inefficent).
Thanks for any help you can lend, it would be greatly appreciated!
Associate Kyle Carter