Game Development Community

Creating a path outside of the TGB builder

by Bruno · in Torque Game Builder · 07/30/2007 (8:45 am) · 2 replies

That's about it, is it possible to create a path dynamically without doing it inside the tgb Builder ?
If, so can someone point me into the right direction ?
The ideia is to create a path dynamically inside a script, so that the origin and destiny of the path can be assigned depending on the position of another object.

thanks,
Bruno

#1
07/30/2007 (9:14 am)
Yup... you create a path by doing the following (just like creating any other t2d object in script actually :)

%path = new t2dPath()
{
   scenegraph = SceneWindow2D.getSceneGraph();
}

Look up t2dPath in the "TGB Reference" under the "Reference" section of the docs... there currently isn't auto-generated definitions of the methods, but there is a listing of methods :)
#2
08/01/2007 (10:50 am)
Thanks :)