hello guys,
my bro and me try to learn 3dgs and I am currently working on c-script and ran into a little problem. I tried to make a little movement script but it doesn't really work or at least I think it doesn't
The thing I wanted to do is to let the player only change the motion up and down and the object was supposed to move straight ahead at all times.
the problem, after I created a little testlevel (just one block and one .mdl to asign the action) I put in the script and assinged the action to the mdl. after I started the lvl, however, everything was black, can someone give me a hint on how I should change the script to make it work?
here is the script:
////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory
/////////////////////////////////////////////////////////////////
// Filename of the starting level.
....
//////////////////////////////////////////////////////////
// Actions
//////////////////////////////////////////////////////////
var dist[3];
action player_move
{
<test_object.mdl> = me;
While (1)
{
dist.x = 10 * mouse_force.x;
dist.y = 10 * mouse_force.y;
dist.z = 10;
Move(MY,nullvector,dist);
wait(1);
}
}
// thats the stuff I wrote
/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;
I hope somebody can help me. by the way, I tried to use mouse_force to use the mouse to move the object, I also changed mouse_mode in the function main part to 1 but I didn't included it in this post due to the length.
thx