Game Development Community

Possible to put exact link spot in game builder?

by J Sears · in Torque Game Builder · 11/17/2006 (7:16 am) · 5 replies

I know in script you can specific exact x y locations for link points and you can set mount offsets. But is there no way to do eithe rin the game builder, you can mount but I can't find a moun toffest (which would seem to be the reason for link points) and for the link points I don't see anyway to specific a precise spot. I am trying to get a bunch of same sized objects to have a link spot in the same exact spot on each item (so that when you mount them to each other they all form the same nice even stack). Is it possible to do without script? been trying to eyeball it and the little tiny bit they're off shows up and it's tough to get them all perfect by eye

#1
11/17/2006 (7:53 am)
At this time your options are doing it in script or customizing the level editor to give you the functionality you are after.
#2
11/17/2006 (8:52 am)
That's what I figured but thought I'd check before abadoning my approach.
#3
11/18/2006 (2:21 am)
You can, (if nothing else) put an object @ 0,0 coordinates, set him a transperancy (temporarely) just to see the grid behind it. Then, with a large zoom, (by using grid) you can set link point @ almost exact 0,0 position.

If you don't nead 0,0 , you can use some other coordinates for object, to place grid where you nead it.

If this doesnt solve your problem, just copy/paste this for every object you nead (you paste it in Game.cs file, OUTSIDE avery functions handler):

datablock t2dSceneObjectDatablock( Object1 )
{
//.........this is what you nead
LinkPoints = "0 0";

//........this is the rest of objects properties, sorted like in game bulder, and NOT alphabetical (as in reference)
size = "5 5";
position = "50 37.5";
class = "SomeClass";
Layer = "0";
GraphGroup = "0";

CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
CollisionCallback = "1";

CollisionDetectionMode = "FULL";
//CollisionCircleSuperscribed = "0";
CollisionResponseMode = "RIGID";
//........u have to use binary code 10110100... transfered into decade system
CollisionLayers = "262210";
CollisionGroups = "0";

CollisionMaxIterations = "1";
MaxLinearVelocity = "1000";

//MountTrackRotation = "0";

//BlendColor = "1 1 1 0.5";

Density = "0.050";
Damping = "1";
Friction = "0.3";
Restitution = "1";

//WorldLimitMax = "100 75";
//WorldLimitMin = "0 0";
//WorldLimitMode = "bounce";

//..........dynamic fields:
//alfa = 1;
};

Comment out what you dont nead, and change what you nead. U can use this for almost every object that is repeting more than once in game.
#4
11/19/2006 (11:36 pm)
What I do is place a temporary red pixel on the source art(on every link point). When everything is aligned, I remove the pixel.
#5
11/20/2006 (3:31 am)
Hehehe, you can do that also :)
QL