Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,211 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Why cant I shoot the bird inside the house? #127487
05/01/07 09:09
05/01/07 09:09
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
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);
}



Last edited by Fiskekona; 05/01/07 09:10.

Programmer in training... Own GameStudio Commerical 6.50
Re: Why cant I shoot the bird inside the house? [Re: Fiskekona] #127488
05/01/07 09:13
05/01/07 09:13

A
Anonymous
Unregistered
Anonymous
Unregistered
A



The bird is not the problem.
Check your house.

Is it a model - use the polygon-flag.

Re: Why cant I shoot the bird inside the house? [Re: ] #127489
05/01/07 09:29
05/01/07 09:29
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
Yes my house is a mdl...it loads much faster.
I checked the polygon box for the house. But no that didnt help. Still cant shoot the bird


Programmer in training... Own GameStudio Commerical 6.50
Re: Why cant I shoot the bird inside the house? [Re: Fiskekona] #127490
05/01/07 09:34
05/01/07 09:34
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
try and make the house passable


Visit:
schwenkschuster-design.de
Re: Why cant I shoot the bird inside the house? [Re: aztec] #127491
05/01/07 09:37
05/01/07 09:37

A
Anonymous
Unregistered
Anonymous
Unregistered
A



noooooo - passable would enable to shoot through the wall...

Is the door a transparent texture or is it a "real" hole?
What's about your shoot-code? (post it)

Re: Why cant I shoot the bird inside the house? [Re: ] #127492
05/01/07 09:54
05/01/07 09:54
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
Here is my "shooting code" I am only using the mouse as a chrosshair to shoot.

Code:
 //muse pekeren blir satt her slik at den får et sikte//
//My chrosshair mouse....gun.... //
function set_mouse(_mode)
{
mouse_mode = _mode;
mouse_map = crosshair_map;
mouse_range = 100000;//dette har jeg lagt til//original 5000
mouse_spot.x = bmap_width(crosshair_map) / 2;
mouse_spot.y = bmap_height(crosshair_map) / 2;

while(mouse_mode)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
mouse_pos.x = clamp(mouse_pos.x,0,screen_size.x - bmap_width(crosshair_map));
wait(1);
}
}



and I also tried this "easy" code attached to the bird inside the house : Code:
 //*****************************************
function skyt_object_10()
{
if(event_type == event_click)

{

my.flag1 = on;

bird_hit_10();
hits_of_the_player += hitvar1;
wait(1);

ent_remove(me);
}
}

action hit_object_10
{
my.enable_click = on;
my.event = skyt_object_10;
while(my.flag1 == off)


{

wait(1);
}

}
//*******************************



Dont work whit this one either.
I have attached this code to the door. And it makes the door dissapeares.
So there is a Hole in the wall also the windows are holes. But it seems like the player arent able to "reach" the bird inside. But if I set it outside the house no problem.......


Programmer in training... Own GameStudio Commerical 6.50
Re: Why cant I shoot the bird inside the house? [Re: Fiskekona] #127493
05/01/07 10:19
05/01/07 10:19
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Maybe you should rewrite your weapon code to use c_trace.

Re: Why cant I shoot the bird inside the house? [Re: Xarthor] #127494
05/01/07 10:47
05/01/07 10:47
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
Will c_trace ....give me the option to shoot something inside a model?


Programmer in training... Own GameStudio Commerical 6.50
Re: Why cant I shoot the bird inside the house? [Re: Fiskekona] #127495
05/01/07 11:02
05/01/07 11:02
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
I'm may be wrong....the top left corner of your mouse_map is
the aim point, ensure it is roll over the target bird.

Re: Why cant I shoot the bird inside the house? [Re: vlau] #127496
05/01/07 11:10
05/01/07 11:10
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
no dont work...sorry....


Programmer in training... Own GameStudio Commerical 6.50
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1