Game Development Community

Assigning link points in datablocks

by Jake Seigel · in Torque Game Builder · 03/31/2008 (7:54 am) · 2 replies

Hey, So i've been getting unexpected issues with assigning multiple link points using datablocks.

here's an example:

datablock t2dSceneObjectDatablock( PlayerDatablock )
{
..
LinkPoints = "-0.038 -0.800 0.172 -0.231 0.1721 -0.2311 0.1722 -0.2312";
..

};


when i open the editor with the datablock assigned to a sprite, i only get the first two link points {-0.038, -0.800} and {0.172, -0.231} assigned. When i run it sometimes i get a third depending on what happens in the code but i don't ever reassign the datablock or anything.
I DO dynamically remount other sprites to the player though. In this case I mount a weapon layer on top of the player's hands, so the link points represent where the hands are in the current animation and is offset by where the handle of the weapon is in the weapon animation.

Any ideas here? this is kind of a big issue for me at the moment. However, I suppose I could just keep the list of link points separate and just alter the current link point, but that's unnecessary coding if i can avoid it.

(if i don't reply right away it's because i can't get back into the forums, but i'll be able to read responses)

#1
03/31/2008 (3:45 pm)
Make a level with an object with the link points that you want. Save the level, then open the .t2d level file with a text editor and see how the Level Builder assigns link points.
#2
04/01/2008 (10:58 am)
Yeah, that's how i figured it out in the first place. Anyway, I used a workaround and got it up and running fine. I think i was most likely just doing something wrong in the first place to mess it up maybe.