Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 806 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with POLYGON and USE_POLYGON #299903
11/27/09 23:23
11/27/09 23:23
Joined: Mar 2009
Posts: 207
E
Erick_Castro Offline OP
Member
Erick_Castro  Offline OP
Member
E

Joined: Mar 2009
Posts: 207
I defined an enemy bot :

my.health = 100;
set(my,POLYGON);
my.emask = ENABLE_SHOOT ;
my.event = got_shot_r1;

....etcetera...


I think the order set(my, POLYGON) of the enemy , limits the c_trace command of my gun to impact only the shape of the model and not the BOX. For example, i would like if the enemy is in the AIM position and there is a box between it and the player when i shoot , logically, cant hurt him.

when i shoot, i defined de c_trace command like this:

c_trace( camera.x, temp, IGNORE_ME | IGNORE_PASSABLE | ACTIVATE_SHOOT | USE_POLYGON)

...etcetera.

The problem is when i shoot , even my enemy is in AIM position the c_trace command of my gun impacts on its BOX and hurt him.

Thanks for your help.


Last edited by Erick_Castro; 11/27/09 23:26.
Re: Problem with POLYGON and USE_POLYGON [Re: Erick_Castro] #299919
11/28/09 03:34
11/28/09 03:34
Joined: Mar 2009
Posts: 207
E
Erick_Castro Offline OP
Member
Erick_Castro  Offline OP
Member
E

Joined: Mar 2009
Posts: 207
well, i think i resolved it in the next way:

when my.status is 0
i animate the "StandShoot" frames that begin in 150.

I made that:

if (my.status == 0)
{
c_updatehull(my,150);
ent_animate(my, "StandShoot", idle_percentage, ANM_CYCLE);
idle_percentage += 12 * time_step;
segundos = segundos+20*time_step;
if ((total_frames % 50) == 1)
{
vec_for_vertex (temp, my, 8);
ent_create ("bala.mdl", temp, move_enemy_bullets);
snd_play(shoot1_wav, 80, 0);
}
if ((segundos > 500) == 1)
{mi_estado=integer(random(2));
my.status = mi_estado;
segundos = 0;}
}

And so on, when my.status = 1 i pass to animate "CrouchAim " animation
that begins in 155 frame
and i do

c_updatehull(my,155);

I am testing and i believe it is working well.

in that video i show how it works.

http://www.youtube.com/watch?v=ag7iyImfFu8

if you see, when the enemy is in the AIM position, the bollet of my gun dont impact its original collision box because it was ajusted to the AIM position.

Note: i dont know why Z-soft dont record the muzzle effect and the explosion of the bullet when it hits the wall or the enemy. But in the game it happens.

Thanks friends.


Last edited by Erick_Castro; 11/28/09 05:35.

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