Hello i would like to convert this piece of dbpro code to GDK but i cant to it properly :s
I would like to achieve that: http://forum.thegamecreators.com/?m=forum_view&t=140441&b=18
for t = 1 to totallimbs
if limb exist(map,t)=1
mapobj=Free_object()
clone object mapobj,map,1
for limb = totallimbs-1 to 1 step -1
if limb<>t
remove limb mapobj,limb
else
x#= limb position x(map,t)
y#= limb position y(map,t)
z#= limb position z(map,t)
LINK LIMB mapobj, 0, limb
position object mapobj,x#,y#,z#
endif
next limb
if right$(left$(LIMB NAME$(mapobj,1),15),5)="metal"
endif
if right$(left$(LIMB NAME$(mapobj,1),14),4)="wood"
endif
if right$(left$(LIMB NAME$(mapobj,1),15),5)="stone"
`play sound 9
SC_Setupobject mapobj,3,0
SC_setObjectCollisionOn mapobj
endif
endif
next t
There is my first attemps but it fail
for(_i1=0; _i1 < 100; _i1++)
{
if (dbLimbExist(_map,_i1) == 1)
{
_NewObj = Core->FindFreeObjectID();
dbCloneObject(_NewObj,_map);
for(_i2 = 100 - 1; _i2 == 1; _i2--)
{
if (_i2 != _i1) dbRemoveLimb (_NewObj,_i2);
else
_x= dbLimbPositionX(_map,_i1);
_y= dbLimbPositionY(_map,_i1);
_z= dbLimbPositionZ(_map,_i1);
dbLinkLimb (_NewObj, 0, _i1);
dbPositionObject(_NewObj,_x,_y,_z);
SC_SetupObject (_NewObj, 1, 0);
};
};
};
};
Compiling is ok but ingame the result is bad
"if limb<>t"
What is the <> symbol ???
I hope someone will be able to help thanks !