Wenn I start it, it shows up an warning;
"empty pointer in main"
Then the energy shuts down.
Were is here the problem?!!
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////
SOUND* bump = "tap.wav";
var bump_handle;
///////////////////////////////////////////////////////////////
function Plop();
///////////////////////////////////////////////////////////////
PANEL* pSplash = { bmap = "logo_800.jpg"; }
VECTOR ball_force;
ENTITY* ball;
ENTITY* stone;
function main()
{
shadow_stencil = 1;
level_load("extrem1.wmb");
ball = ent_create ("ball.mdl", vector(-76, -7, 135), NULL);
set(ball,SHADOW);
ph_setgravity (vector(0, 0, -386));
phent_settype (ball, PH_RIGID, PH_SPHERE);
phent_setmass (ball, 10, PH_SPHERE);
phent_setfriction (ball, 99);
phent_setdamping (ball, 40, 40);
phent_setelasticity (ball, 10, 20);
while (1)
{
ball_force.x = 380 * time_step * (key_d - key_a);
ball_force.y = 380 * time_step * (key_w - key_s);
ball_force.z = 0;
phent_addtorqueglobal (ball, ball_force);
camera.x = ball.x - 29;
camera.y = ball.y;
camera.z = 30;
camera.tilt = -5;
wait (1);
}
}
action bigstone()
{
set(my,SHADOW);
ph_setgravity (vector(0, 0, -386));
phent_settype (stone, PH_RIGID, PH_BOX);
phent_setmass (stone, 1, PH_BOX);
phent_setfriction (stone, 99);
phent_setdamping (stone, 40, 40);
phent_setelasticity (stone, 10, 20);
stone.event = hit;
stone.emask |= ENABLE_FRICTION;
}
function hit()
{
sbump

_handle = ent_playloop(my,bump,100);
}