Hi all,
Well I am close, I have very good collision now.
All I need now is how do one call a function????
See photo below of collision, when the collision happens
both the plane and the missile stop.
Here is the code where I need to call the function.
action act_ship1()
{
ship1 = me;
my.emask |= ENABLE_IMPACT; // make entity sensitive for block and entity collision
while(1)
{
if (key_z) {me.pan += 3*time_step;}
if (key_x) {me.pan -= 3*time_step;}
//{c_move (me,vector( -2,0,0),nullvector,0);}
c_move(me,vector(-5*time_step,0,0),nullvector,0); // move ahead until obstacle is hit
wait(1);
{
}
}
}
No matter how I try to call the function that act's on the collision I get undeclared indentifier.
Here is my function I need to call
function bounce_event()
{
switch (ENABLE_IMPACT)
{
case EVENT_BLOCK:
sys_exit ("bye bye");
return;
case EVENT_ENTITY:
sys_exit ("bye bye");
return;
}
}
I can not find how to call a function in the manual.
So can anyone help?