make monster attack a entity
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
make monster attack a entity
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?
any fix?
- Jukki
- Posts: 214
- Joined: Wed Apr 07, 2010 4:59 am
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).
-

lth - Posts: 144
- Joined: Thu Nov 11, 2004 1:15 pm
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.
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
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;
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
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest