Link point easy to access from script?
by Alex Rice · in Torque Game Builder · 06/11/2006 (9:36 pm) · 2 replies
In the TGB level builder, it's easy to drop an object onto another object's link point to mount it. Works great. But from script the link points are a little on the tedious side. Is there a more direct way? here is what I ended up writing:
%tLinkWorldPoint = %this.positionTargetMountToCell.getLinkPoint(1);
%tLinkLocalPoint = %this.positionTargetMountToCell.getLocalPoint(
getWord( %tLinkWorldPoint, 0),
getWord( %tLinkWorldPoint, 1));
%this.mount( %this.positionTargetMountToCell,
getWord( %tLinkLocalPoint, 0 ),
getWord( %tLinkLocalPoint, 1),
100, true, false, false, false);About the author
Torque Owner Adam Larson
I hadn't really thought of this particular situation, so I will consider exposing it - need to check something first to make sure everything will work properly (technically link points and mount points are not exactly the same thing).