hey all.
just in the following code the car need to impact with the ball then the event will called . so, how to activate the event (ENTITY) between car and the ball .
here is the code.
function detect()
{
if (event_type == EVENT_ENTITY)
{
my.z=60;
}
}
action ball()
{
my.push=3;
my.emask |= ENABLE_IMPACT; // lite-C
my.event = detect;
}
action car_with_pointer()
{
my.push=4;
my.emask |= ENABLE_IMPACT;
my.event = detect;
while (1)
{
if (key_cur)
{
my.pan += 3*time_step;
}
if (key_cul)
{
my.pan -= 3*time_step;
}
if (key_cuu)
{
c_move (my, vector(10 * time_step, 0, 0), nullvector, GLIDE);
}
wait (1);
}
}