T2DTriggerComponent Disabling
by Zachary Davids · in Torque X 2D · 11/28/2009 (3:44 am) · 2 replies
I'm relatively new to TorqueX and I need some help disabling the "Enabled" checkbox in the T2DTriggerComponent dropdown in TXB via C# code so that the player cannot move backwards into it once more.
Any help would be greatly appreciated.
EDIT:
I'm curious as to why when this trigger is called it does not stop the current scene and load a fresh one (the level1.txscene is just a placeholder for level2). Am I missing something, or must this be in a onCollisionDelegate instead?
Any help would be greatly appreciated.
EDIT:
I'm curious as to why when this trigger is called it does not stop the current scene and load a fresh one (the level1.txscene is just a placeholder for level2). Am I missing something, or must this be in a onCollisionDelegate instead?
public static void LoadLevel2OnEnter(T2DSceneObject ourObject, T2DSceneObject theirObject)
{
Game.Instance.SceneLoader.Load(@"data/levels/level1.txscene");
}
#2
11/28/2009 (8:10 pm)
put a break point in that method and see to see if it is even getting called.
Zachary Davids