Posted By: mikaldinho
a menu question - 03/07/10 14:31
i have a simple question:
i am making a physics game, and i would like to use the menu template you and raiden made. but whenever i try to add the menu to the game, it just comes up with the message "can't compile script".
here is the code i have for my game:
any way of incorperating the menu code* into this? i can not seem to do it.
* the menu code is the menu template made by realspawn and raiden.
please can you help me????
i am making a physics game, and i would like to use the menu template you and raiden made. but whenever i try to add the menu to the game, it just comes up with the message "can't compile script".
here is the code i have for my game:
Code:
/////////////////////////////////////////////////////////////// #include <acknex.h> #include <default.c> /////////////////////////////////////////////////////////////// VECTOR ball_force; ENTITY* ball; function main() { level_load("floor1.wmb"); // load the level ball = ent_create ("ball.mdl", vector(-400, 0, 100), NULL); // create the ball ph_setgravity (vector(0, 0, -386)); // set the gravity phent_settype (ball, PH_RIGID, PH_SPHERE); // set the physics entity type phent_setmass (ball, 3, PH_SPHERE); // and its mass phent_setfriction (ball, 80); // set the friction phent_setdamping (ball, 40, 40); // set the damping phent_setelasticity (ball, 50, 20); // set the elasticity while (1) { ball_force.x = 150 * time_step * (key_cur - key_cul); // move the ball using the cursor keys ball_force.y = 150 * time_step * (key_cuu - key_cud); // 25 sets the x / y movement speeds ball_force.z = 0; // no need to move on the vertical axis phent_addtorqueglobal (ball, ball_force); // add a torque (an angular force) to the ball camera.x = ball.x - 300; // keep the camera 300 quants behind the ball camera.y = ball.y; // using the same y with the ball camera.z = 1000; // and place it at z = 1000 quants camera.tilt = -60; // make it look downwards wait (1); } }
any way of incorperating the menu code* into this? i can not seem to do it.
* the menu code is the menu template made by realspawn and raiden.
please can you help me????