Can I be a real pain and get you to post an example script that for that c++ code? I'm having trouble registering the c++ stuff I've bound and then getting it to do anything from script. I was just testing with some basic ones like this:
int GM_CDECL getObjectPositionX( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectPositionX(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL getObjectPositionY( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectPositionY(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL getObjectPositionZ( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectPositionZ(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL getObjectAngleX( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectAngleX(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL getObjectAngleY( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectAngleY(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL getObjectAngleZ( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(1);
GM_CHECK_INT_PARAM( objNo, 0 );
float ret = dbObjectAngleZ(objNo);
a_thread->PushFloat( ret );
return GM_OK;
}
int GM_CDECL setObjectPosition( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(4);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( xPos, 1 );
GM_CHECK_FLOAT_PARAM( yPos, 2 );
GM_CHECK_FLOAT_PARAM( zPos, 3 );
dbPositionObject(objNo,xPos,yPos,zPos);
return GM_OK;
}
int GM_CDECL setObjectRotation( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(4);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( xAngle, 1 );
GM_CHECK_FLOAT_PARAM( yAngle, 2 );
GM_CHECK_FLOAT_PARAM( zAngle, 3 );
dbRotateObject(objNo,xAngle,yAngle,zAngle);
return GM_OK;
}
int GM_CDECL setObjectAngleX( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(2);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( xAngle, 1 );
dbXRotateObject(objNo,xAngle);
return GM_OK;
}
int GM_CDECL setObjectAngleY( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(2);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( yAngle, 1 );
dbYRotateObject(objNo,yAngle);
return GM_OK;
}
int GM_CDECL setObjectAngleZ( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(2);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( zAngle, 1 );
dbXRotateObject(objNo,zAngle);
return GM_OK;
}
int GM_CDECL setObjectScale( gmThread *a_thread )
{
GM_CHECK_NUM_PARAMS(4);
GM_CHECK_INT_PARAM( objNo, 0 );
GM_CHECK_FLOAT_PARAM( xScale, 1 );
GM_CHECK_FLOAT_PARAM( yScale, 2 );
GM_CHECK_FLOAT_PARAM( zScale, 3 );
dbScaleObject(objNo,xScale,yScale,zScale);
return GM_OK;
}