Hello,
I've recently started making my own little sphere-game after completing most of the lite-c tutorials but i'm a bit unclear about a couple things. The first thing is that by ball jumps, but unfortunatly it goes very high, In a normal game, you press jump as much as you want but it will ignor all other jumps untill your back on ground but mine are cumilitive and never stop, how could I make it stop? the function is this:
// This is our event function for hitting the [Space] key.
function Kick()
{
// Create a speed vector and rotate it in camera direction.
vKick.x = 0; vKick.y = 0; vKick.z = 0;
// Add a vertical speed to give the ball an upwards kick.
vKick.z = 300;
// Now apply the speed to the ball, and play a hit sound.
phent_addvelcentral(ball,vKick);
Plop();
wait (-2);
}
------------------------------------------------------------------------------
My next question is once my ball gets to the end of the course I have a doorway with a black box, I dont need anything fancy, I just want it so that when the back hits the door (collides with it) a new "loading" screen comes on and a few seconds later I get a new level, because right now my entire second level is in another .c file with a main functions and others like the first one, so basicly ide like it to run my second .c file like it was my first (unless there is an easier way)
-------------------------------------------------------------------------------
My last question isw optional but would be nice to have... Right now my camera is set to stay consistantly 300 feet from my ball... the script is :
camera.x = ball.x - 600; // keep the camera 300 quants behind the ball
camera.y = ball.y; // using the same y with the ball
camera.z = ball.z + 300; // and place it at z = 1000 quants
vForce.x = -5*(mouse_force.x); // pan angle
vForce.y = 5*(mouse_force.y); // tilt angle
vForce.z = 0; // roll angle
vec_accelerate(vMove,vAngularSpeed,vForce,0.8);
vec_add(camera.pan,vMove);
unfortunatly that camera makes it feel like a 3d scroller game in the sence that when the ball turns left or right, the camera just moves, so basicly i'de like a follow cam/chase cam, I know there is a prefab one but I have no idea how to implement it...
Thank You,
JmasterX