Game Development Community

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?

#1
09/22/2009 (4:29 pm)
Still am unsure how to do this.

Any suggestions?
#2
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;
}