[B5 Bug] TriggerData::onAdd() isn't called, Trigger::onAdd() is
by Eric den Boer · in Torque 3D Professional · 09/28/2009 (6:43 am) · 4 replies
Found an issue where the TriggerData::onAdd() function isn't called - both in script and C++. The instanceName::onAdd() however, is called.
I put two breakpoints on the data and object onAdd() in visual studio and it didn't ever call the datablock onAdd. The object did get called, the same thing is reflected in script. This is pretty annoying.
I put two breakpoints on the data and object onAdd() in visual studio and it didn't ever call the datablock onAdd. The object did get called, the same thing is reflected in script. This is pretty annoying.
Associate Rene Damm
Can't confirm TriggerData::onAdd() not being called. Correctly triggers for me and I don't see a reason there why it shouldn't.
As for the script-side onAdd not being called on the datablock, that's the fault of Trigger as it's the responsibility of leaf classes derived from GameBase to do that. If you need this just add:
if (isServerObject()) scriptOnAdd();to Trigger::onAdd().