Is there anyway to check if something is already attached to a linkpoint?
by Randy Lutcavich · in Torque X 2D · 09/14/2009 (11:20 pm) · 2 replies
Let's say I have a player object, a red dot and a blue dot. The player object has two link points. If one dot is already attached to the first link point I want the second dot to attach to the second link point.
I've got it all figured out but the code that checks if a link point has something mounted to it. What is this code?
I've got it all figured out but the code that checks if a link point has something mounted to it. What is this code?
About the author
Recent Threads
#2
T2DSceneObject mountedObject = PlayerObject.GetMountedObject("LinkPointName");
if (mountedObject == Null)
{
return false;
{
else
{
return true;
}
09/22/2009 (8:42 pm)
I think you could use the following in a new function if you just wanted to test:T2DSceneObject mountedObject = PlayerObject.GetMountedObject("LinkPointName");
if (mountedObject == Null)
{
return false;
{
else
{
return true;
}
Torque Owner Randy Lutcavich
Any suggestions?