Game Development Community

When will it end? Path quetion

by Stuart Kenny · in Torque Game Builder · 01/26/2009 (11:56 am) · 2 replies

I've been looking through the documentation and I can't find anyway to tell when an object reaches the end of a Path.

I'm trying to use paths to plot attack animations. I want to trigger an object along a path and then (ideally) get call callback when the end of the path is reached.

The tutorial doesn't address approaching Pathing from code, and the documentation is far from clear.

Can anyone please point me in the right direction?

#1
01/26/2009 (12:20 pm)
Quote:
function t2dPath::onPathFinished(%this, %object, %node)
{
// %this is the path object.
// %object is the object following the path.
// %node is the end node os the path
}

Here are the three t2dPath callbacks:

http://tdn.garagegames.com/wiki/TGB/Reference:_t2dPath#Callbacks
#2
01/27/2009 (10:11 am)
Thanks.

For some reason the callbacks aren't listed in the downloaded documentation.

Glad to see they're in the wiki.