I am making a moorhuhn like game.
In one of my houses there is a bird that is walking back and forth. You can see it thru the windows. When you shoot the door, you get a good possibility to shoot the bird thru the opening where the door was.
Here comes my problem?????
I can shoot the door, but I cant shoot the bird that are inside.
If I take the bird outside the house then it isent any problem shooting it so it dissapeares.
How do I solve this? Or isent it possible to shoot something inside something when you are on the outside.
i am talking about the red bird inside this house:
Code:
define speed_x,skill21;
define speed_y,skill22;
define speed_z,skill23;
function hit_walkingbird()
{
if(event_type == event_click)
{
my.flag1 = on;
highscore += hitvar1;
wait(1);
}
if(event_type == event_block)
{
my.pan += 180; //turn around
}
}
action walking_bird
{
my.enable_block = on;
my.enable_click = on;
my.event = hit_walkingbird;
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);
c_move(my,speed,nullvector,ignore_passable);
ent_cycle("walk", my.skill1); // animate the bird
my.skill1 += 3 * time; // animation speed
my.skill1 %= 100; // loop animation
wait(1);
}
ent_remove(me);
}