I have a flying bird that are supposed to turn when it hits a invisble wall.
But the bird is stopping when it reaches the wall.
The wall is a mdl. And I have set it to invisble.
Why isent it "reacting" to the wall. I have also tried to have it visible and no reaction. The bird only stops right infront of it.
here is the code I am using.
and yes I am using
my.enable_block = on;
Code:
define speed_x,skill21;
define speed_y,skill22;
define speed_z,skill23;
function hit_event_10()
{
if(event_type == event_click)
{
my.flag1 = on;
highscore = hitvar1;
wait(1);
}
if(event_type == event_block)
{ my.pan += 180; //turn around
}
}
action hit_object_10
{
my.enable_block = on;
my.enable_click = on;
my.event = hit_event_10;
my.speed_x = 10;
my.speed_y = 0;
my.speed_z = 0;
var speed[3];
while(my.flag1 == off)
{
vec_set(speed,my.speed_x);
vec_scale(speed,time);
ent_cycle("walk", my.skill1); // animate the bird
my.skill1 += 3 * time; // animation speed
my.skill1 %= 100; // loop animation
c_move(my,speed,nullvector,ignore_passable);
wait(1);
}
ent_remove(me);
}