Game Development Community

T3D 1.1 Beta 2 - Trigger Parenting Callbacks Broken - LOGGED

by Steve Acaster · in Torque 3D Professional · 08/05/2010 (10:17 am) · 9 replies

T3D 1.1 beta 2

Windows 7 32bit

Target:
Triggers

Issue:
Parenting callbacks are broken in "Triggers". Triggers still work as expected though.

Repeat:
Using world editor, place a trigger in-game (default datablock is fine) and then walk through trigger. Now check console.

scripts/server/triggers.cs (16): Unknown command onEnterTrigger.
scripts/server/triggers.cs (39): Unknown command onTickTrigger.
scripts/server/triggers.cs (39): Unknown command onTickTrigger.
scripts/server/triggers.cs (39): Unknown command onTickTrigger.
scripts/server/triggers.cs (25): Unknown command onLeaveTrigger.

Callbacks to parenting are not functioning.

Suggest:
Either fix it or if it's depreciated rip 'em out - whichever is best.

#1
08/11/2010 (5:22 pm)
Logged as TQA-764 for the QA team to verify.
#2
03/02/2011 (7:24 am)
Has this been looked at or fixed? Does this mean that calls to onEnterTrigger, onLeaveTrigger and onTickTrigger are ignored?
#3
03/02/2011 (7:53 am)
I just want to add to this. If they are ignored or not ignored what would the new syntax be. I downloaded the new binary and according to the docs the syntax guide still has the trigger commands as the same "onEnterTrigger, onLeaveTrigger and onTickTrigger".
#4
03/02/2011 (8:27 am)
It seems to just be console spam - doesn't hurt but will eat your console with messages. If you find them (sure it's only 1.1beta3) comment out the parent::etcetera.
#5
03/02/2011 (12:41 pm)
I just cant buy that, not that I dont believe you but when trying to implement www.garagegames.com/community/resources/view/12430 in T3D it does not work, yet when implementing in TGE it works. I have verified that the other commands and syntax is still in the manual.

This makes me think they have busted the triggers somewhere or they have not updated the scripting manual.

Gonna try this in 1.0.1

Same thing in 1.0.1 unknown command script errors.
#6
03/02/2011 (1:22 pm)
The whole parenting and namespace thing has had some changes done to it... but should still work about the same.

@J L
I see no reason why that linked Resource shouldn't work. Double check the namespaces and if using the GameType packages (stock in T3D script) then you're most likely passing the client or object id in for when it's looking for the gametype id - means that the default code is looking for one extra variable than what the old TGE/TGEa was looking for, and order does matter.

I say this due to fact that I had CTF (using triggers), and other gametypes (including teams), working in the earlier versions of T3D; it was just never included when the FPS example was cut down to it's current incarnation.
#7
03/02/2011 (2:02 pm)
It looks like they commented out the console methods at one point in trigger.cpp. These methods were the ones that iterated through everything in the same group and makes the trigger calls on the objects. For example:
//ConsoleMethod( TriggerData, onEnterTrigger, void, 4, 4, "( Trigger t, SimObject intruder)")
//{
//   Trigger* trigger = NULL;
//   if (Sim::findObject(argv[2], trigger) == false)
//      return;
//
//   // Do nothing with the trigger object id by default...
//   SimGroup* pGroup = trigger->getGroup();
//   for (SimGroup::iterator itr = pGroup->begin(); itr != pGroup->end(); itr++)
//      Con::executef(*itr, "onTrigger", Con::getIntArg(trigger->getId()), "1");
//}
#8
03/02/2011 (2:22 pm)
I have made another gametype according to www.garagegames.com/community/forums/viewthread/111837. Is that the only thing needed to do?

Just trying to get this resource updated to T3D as I would think many could use it.
#9
03/03/2011 (7:59 am)
@J:
Straying off topic... but yeah, that is how you get the level to recognize what gametype to use, and how to quickly duplicate/hack a new GameType package and proper namespaced functions for it to use which parent back to or override those in the GameCore package.