Alright, I just re-read the Collision Detection section of the Help file over and over again, and now I'm confused. It told you what it did, but it didn't really go into how to set it up.

I put in c_move(my,vector(5*time,0,0),nullvector,USE_AABB); near the top of my player action, but nothing happened. I then put it in the while(1) loop, and then my player started sliding all over the place.

Say I wanted to ditch the current collision detection and go back to the default. How would I go about doing that?

P.S. I'm not using templates for this game. They were starting to hold me back.

EDIT: C-Script for action.player1:

Code:
 action player1
{
player = my; // I'm the player

my.x = -80; // set the proper position and orientation for the player
my.y = 800; // this is useful if you have a huge level and the player is too small to be noticeable on the map in Wed
my.z = 64;
my.pan = -90;
my.transparent = off; // the player is not transparent
my.polygon = on;
my.passable= off;
my.alpha = 100; // but opaque if the camera doesn't run into obstacles
my.skill40 = camera_distance; // we store the distance to the camera
my.skill41 = camera_height; // and its height
camera_mode = 3; // the game starts with the camera in 3rd person mode
while (1)
{
while (stop_player == 1) {wait (1);}
collision_check();
//////////////////////
c_move(my,vector(5*time,0,0),nullvector,USE_AABB);
if (key_enter == 1) {event_check();}
/////////////////////////PLAYER DIRECTIONAL MOVEMENT
if (key_shift == 1) {speed = 18;} else {speed = 8;} // makes Matoran walk faster
if (key_cuu + key_cud + key_cur + key_cul > 0) // if the player is walking
{
////////UP
if (key_cuu == 1) {
my.pan = 90;
if (move_forward == yes)
{
my.y += speed*time;
player_state = walk;}
else {player_state = wait;}
}
//////////DOWN
if (key_cud == 1) {
my.pan = -90;
if (move_back == yes)
{
my.y -= speed*time;
player_state = walk;
}else {player_state = wait;}
}
///////RIGHT
if (key_cur == 1) {
my.pan = 0;
if (move_right == yes)
{
my.x += speed*time;
player_state = walk;
}else {player_state = wait;}
}
// LEFT
if (key_cul == 1) {
my.pan = 180;
if (move_left == yes)
{
my.x -= speed*time;
player_state = walk;
}else {player_state = wait;}
}
////////UP RIGHT
if (key_cuu == 1) && (key_cur ==1) {
my.pan = 45;
if (move_forward == yes) && (move_right == yes)
{
my.y += speed*time;
my.x += speed*time;
player_state = walk;}
else {player_state = wait;}
}
//////// DOWN RIGHT
if (key_cud == 1) && (key_cur ==1) {
my.pan = -45;
if (move_back == yes) && (move_right == yes)
{
my.y -= speed*time;
my.x += speed*time;
player_state = walk;}
else {player_state = wait;}
}
//////// UP LEFT
if (key_cuu == 1) && (key_cul ==1) {
my.pan = 135;
if (move_forward == yes) && (move_left == yes)
{
my.y += speed*time;
my.x -= speed*time;
player_state = walk;}
else {player_state = wait;}
}
//////// DOWN LEFT
if (key_cud == 1) && (key_cul ==1) {
my.pan = -135;
if (move_back == yes) && (move_left == yes)
{
my.y -= speed*time;
my.x -= speed*time;
player_state = walk;}
else {player_state = wait;}
}
///////////////////////////////////
ent_cycle("walk", my.skill46); // play its "walk" frames animation
my.skill46 += 10 * (1 + key_shift * 0.5) * time; // the animation speed increases when the player presses the "shift" key
my.skill46 %= 100; // loop the animation
}
else // if the player is standing
{
my.skill47 = 0; // reset the skill that stores the distance needed for the step sound (not really needed)
ent_cycle("stand", my.skill48); // play the "stand" frames animation
my.skill48 += 2 * time; // "stand" animation speed
my.skill48 %= 100; // loop animation
}

my.skill47 += ent_move (temp, nullvector);
if (my.skill47 > 50) // play with 50 (here we've got a step sound every 50 quants)
{
snd_play(step_wav, 30, 0);
my.skill47 = 0;
}
wait (1);
}
}
////////////////////////////



Last edited by Cyan; 08/22/07 19:31.