Game Development Community

Can't copy/paste a trigger..

by Nicolai Dutka · in Torque Game Engine · 09/16/2007 (2:20 pm) · 1 replies

I have placed about 4 triggers in this one mission using copy/paste and verified that ALL of them work.

I closed Torque, open my triggers.cs file, copy/pasted the code for the trigger, changed the names of the new trigger and its respective functions, and tried to place this new trigger in the world.

I got one trigger in, and it WILL NOT let me add any more. If I delete this first one I made, I can make another, but then I'd have to delete that one to make another.

Every time I click to make one or try to copy/paste one, my console gives the following error:

Object 'Boat' is not a member of the 'GameBaseData' data block class.
<input> (0) : Register object failed for object Boat of class Trigger.

Yet if I delete the first one I made, it lets me make another. Just nothing beyond ONE... ALL the rest of my triggers were made and duplicated this exact same way, so why would it only not work for THIS particular trigger? I don't even have anything happening in it! (I'll paste the entire trigger code here so you can see it is perfect)

datablock TriggerData(Boat)
{
	tickPeriodMS = 250;
};

function Boat::onEnterTrigger( %this, %trigger, %obj )
{
  echo("stepped in the boat trigger");
}

#1
09/18/2007 (7:39 am)
I think the problem was prolly a naming issue. I prolly had an object in the world already named "boat" so when I try to copy/paste a trigger with that name, it doesn't know what to do. I find this limitation rather stupid because I SHOULD be able to have a trigger with the same name as a static mesh, but I guess in Torque, they are ALL considered "objects" and thus, cannot share a name. Effin weak...