Game Development Community

Getting name of StaticShapes

by Stefan Beffy Moises · in Torque Game Engine · 10/17/2002 (10:34 pm) · 0 replies

Hi there,
I need to get the name of static shapes, but both getName() and getShapeName() return "null"... does anybody have any explanation for that?
Here is the snipit:
GameConnection* conn = GameConnection::getServerConnection();
     if (!conn) return;

...
for (SimSetIterator itr(conn); *itr; ++itr) {
	if ((*itr)->getType() & StaticShapeObjectType) {
		StaticShape* trigger = static_cast<StaticShape*>(*itr);
		Con::printf("Shape found! %s, %s", trigger->getShapeName(), trigger->getName());
		// if it's a "TeleportTrigger"...
		if(trigger->getName() == NULL)
			return;
		if (dStrstr(trigger->getName(), "Teleport") != NULL) {
			Con::printf("FOUND TRIGGER!!!");
Here is the mission entry (I want to get the "TeleportEffect1")
new StaticShape(TeleportEffect1) {
      position = "87.7124 -43.9732 146.762";
      rotation = "1 0 0 90.5273";
      scale = "1 1 1";
      dataBlock = "MeshEffect";
   };

Thx a lot!!