Game Development Community

triggers and onEnter code

by master · in Torque Developer Network · 11/20/2009 (5:45 am) · 3 replies

I've a problem about the triggers in TGB.
Is this code true?
It is a part of my behavior:

function name::onEnter(%this, %a)
{
   t2dSceneWindow.setCurrentCameraMove (100,100);
   t2dSceneWindow.startCameraMove (2.0);
}


It doesn't Work when i add it to my behavior.
How can i use it? How can i set that when my object entered to a trigger, the camera move then?
If this code is true , why it doesn't work and if this code is not true , what is the correct code?
Please help me.
Thank you.

Sorry about my English. My English is not good.

About the author

Recent Threads


#1
11/20/2009 (7:41 am)
function triggername::onEnter(%this, %a)
{
   t2dSceneWindow.setCurrentCameraMove (100,100);
   t2dSceneWindow.startCameraMove (2.0);
}


#2
11/20/2009 (7:48 am)
Sorry it was only a misspelling.
Thank you but it still doesn't work.
#3
01/09/2010 (2:58 am)
@master

function triggername::OnEnterTrigger(%this,%a)
{

}

just try like this way...May this will work ..