Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AbrahamR, 1 invisible), 858 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity passable! help #250865
02/10/09 12:10
02/10/09 12:10
Joined: Nov 2008
Posts: 42
Philippines
gagamBRYAN Offline OP
Newbie
gagamBRYAN  Offline OP
Newbie

Joined: Nov 2008
Posts: 42
Philippines
guys,

i have a problem.. with regards to my entity. I have a player but it passes his enemy. i mean when he does the attack animation, specifically the stabbing part his hands pass through the enemy's body.

how to declare it to not become passable?

i'm sure u know the answer to my problem. tnx!


Secrets are stolen from deep inside..
Re: entity passable! help [Re: gagamBRYAN] #250872
02/10/09 12:41
02/10/09 12:41
Joined: Jan 2009
Posts: 33
Philippines, Quezon City
K
Kaizen_31 Offline
Newbie
Kaizen_31  Offline
Newbie
K

Joined: Jan 2009
Posts: 33
Philippines, Quezon City
only the back stabbing part??
why will happen when your character attacks your AI in front??
ahmmm...

try to post your sample code..

Re: entity passable! help [Re: Kaizen_31] #250912
02/10/09 17:17
02/10/09 17:17
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
set(my,POLYGON)

Re: entity passable! help [Re: Widi] #250968
02/11/09 00:17
02/11/09 00:17
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i think you need to change the size of your bounding box to include the weapon

c_setminmax(ent); but create a dummy model around the whole entity

Re: entity passable! help [Re: MrGuest] #251007
02/11/09 08:14
02/11/09 08:14
Joined: Nov 2008
Posts: 42
Philippines
gagamBRYAN Offline OP
Newbie
gagamBRYAN  Offline OP
Newbie

Joined: Nov 2008
Posts: 42
Philippines
yeah, i try to c_setminmax(ent); it works! however,

the player is blinking in the idle state (referring if he reach the point of the location after walking or running).

but when i remove the c_setminmax, he perform the idle animation.

how to set off the c_setminmax in lite c?

here is the sample code:
Code:

action player_action()
{

VECTOR temp[3];VECTOR temp2[3];VECTOR temp_target[3];VECTOR pos1[3];VECTOR pos2[3];
var anim_percentage;
vec_set(temp_target,my.x);
while(1)	
{
		if(mouse_left)
		{
		while	(mouse_left){wait(1);}	
		pos1.x = mouse_pos.x;pos1.y = mouse_pos.y;pos1.z = 0;
		vec_for_screen (pos1, camera);
		pos2.x = mouse_pos.x;pos2.y = mouse_pos.y;pos2.z = 20000; 
		vec_for_screen (pos2, camera);
		c_trace (pos1,pos2,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS);
		vec_set(temp_target,target);	
		}	
		if(vec_dist(my.x,temp_target.x)>20)
		{
		vec_set(temp.x,temp_target.x);
		vec_sub(temp.x,my.x)	;	
		vec_to_angle(my.pan,temp);	
		my.tilt=0;
		c_move (my, vector(30*time_step,0 , -2), nullvector, IGNORE_PASSABLE | GLIDE);
		ent_animate(my, "walk", anim_percentage, ANM_CYCLE); 
		anim_percentage += 10 * time_step;
		}
		else
		{
		ent_animate(my, "idle", anim_percentage, ANM_CYCLE); 
		anim_percentage += 2 * time_step;		
		}
			
		wait(1);	
		}	
}

function main()
{

player = ent_create("player.mdl",vector(0,0,0),player_action);	

c_setminmax(player);

}



pls help! tnx so much


Secrets are stolen from deep inside..
Re: entity passable! help [Re: gagamBRYAN] #251028
02/11/09 09:44
02/11/09 09:44
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
try c_updatehull wink


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
Re: entity passable! help [Re: Jaxas] #251032
02/11/09 09:59
02/11/09 09:59
Joined: Nov 2008
Posts: 42
Philippines
gagamBRYAN Offline OP
Newbie
gagamBRYAN  Offline OP
Newbie

Joined: Nov 2008
Posts: 42
Philippines
@Jaxas: how? i don't know how to put it in my code..


Secrets are stolen from deep inside..
Re: entity passable! help [Re: gagamBRYAN] #251081
02/11/09 14:57
02/11/09 14:57
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
else you can try to change entity.max_x or y or z. I use it when my player is crouching smile

example:

if(key_cud )
{
my.max_z = 20;
}
else
{
my.max_z = 50;
}


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)

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