Forum

make monster attack a entity

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

make monster attack a entity

Postby Jukki » Sun Nov 21, 2010 7:52 am

Hey i have one entity in my map. Its kinda like monster without moving etc. It is solid bsp (cause i wana shoot trought it). and make it so monsters can hurt it. Problem is. They zombies do walk to them. But not attack. (they do attack if i set it solid_bbox) but then i cant shoot trought open parts of model.

any fix?
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby demnuh235 » Tue Feb 22, 2011 7:39 pm

How about having 4 entitys instead of 1? They would make you a hole, plus your barricade could be partially destroyed?
demnuh235
 
Posts: 17
Joined: Mon May 03, 2010 6:54 pm
Location: Russia

Postby demnuh235 » Tue Feb 22, 2011 7:42 pm

Or u could make a little invisible entity and put it inside the barricade. Zombies' brains would touch the solid object, decreasing its health
demnuh235
 
Posts: 17
Joined: Mon May 03, 2010 6:54 pm
Location: Russia

Postby lth » Fri Feb 25, 2011 11:50 pm

What is your zombie AI code like? Vanilla Quake? Or have you modified it? Because monsters won't naturally attack anything apart from clients (unless the other thing attacked them first).
User avatar
lth
 
Posts: 144
Joined: Thu Nov 11, 2004 1:15 pm

Postby Jukki » Sat Feb 26, 2011 5:45 am

Naah. Thx for help. But we allready did tis like 3 months ago XD

I finaly decided i create a second enity to back of the entity. when monster touches this trigger entity, they play a attack anim and entity takes damage. So they realy dont attack it.
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby necros » Sun Feb 27, 2011 6:53 am

mmm, this was bumped but i'll go anyway:

the reason monsters can't attack a solid_bsp is because of the way the engine and qc work.

monsters use the target's .origin to determine if they can 'see' it, and also if they have a clear shot to hit it.

the problems happens because solid_bsp entities always start with an origin of '0 0 0', ie, the center of the map.

you would have to modify the zombie targetting code so that, if it detects self.enemy is a solid_bsp, to, instead of using .origin, use the middle point between .absmin and .absmax, by doing centerPoint = (self.enemy.absmin + self.enemy.absmax) * 0.5;
necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest