Enemy ignores you unless shot?
Moderator: InsideQC Admins
9 posts
• Page 1 of 1
Enemy ignores you unless shot?
Anyway to have a monster ignore you unless shot via QuakeC?
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Enemy ignores you unless shot?
That made it sink in. Since I don't QuakeC much I can be a little "slow".
Such a grunt minds own business unless you attack him.
For anyone else else:
Added in defs.qc: float .peaceful; < ---- added that to end
Added in ai.qc @ FindTarget()
- Code: Select all
if (client == self.enemy)
return FALSE;
if (self.peaceful) // <---------------------- ADDED
return FALSE; // <---------------------- ADDED
if (client.flags & FL_NOTARGET)
return FALSE;
And then in the entity:
{
"classname" "monster_army"
"origin" "0 576 24"
"angle" "0"
"peaceful" "1" // <------------------------- added
}
Such a grunt minds own business unless you attack him.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: Enemy ignores you unless shot?
you can edit the entity within QuakeC in soldier.qc
no need for .ent support or modified maps.
- Code: Select all
void() monster_army =
{
...
self.peaceful = TRUE;
no need for .ent support or modified maps.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Re: Enemy ignores you unless shot?
OTOH, maybe he wants only SOME of the soldiers to ignore the player.
Both methods work, but with different results.
Both methods work, but with different results.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Enemy ignores you unless shot?
Baker wrote:That made it sink in. Since I don't QuakeC much I can be a little "slow".For anyone else else:
[...]
Such a grunt minds own business unless you attack him.
You forgot to code the "unless you attack him" part.
IIRC I've coded this as a feature in the Cheats Menu of my JoyMenu mod.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
Re: Enemy ignores you unless shot?
mankrip wrote:You forgot to code the "unless you attack him" part.
IIRC I've coded this as a feature in the Cheats Menu of my JoyMenu mod.
in combat.qc, T_Damage
- Code: Select all
if ( (self.flags & FL_MONSTER) && attacker != world)
{
if (self.classname == "monster_army")
self.peaceful = FALSE;
I was trying to think of a way to do this in the opposite way, where like if the player picks up a badge and soldiers would ignore the player if they had IT_BADGE for instance.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Re: Enemy ignores you unless shot?
IT_BADGE would have similarities to invisibility power up?
-
qbism - Posts: 1236
- Joined: Thu Nov 04, 2004 5:51 am
Re: Enemy ignores you unless shot?
qbism wrote:IT_BADGE would have similarities to invisibility power up?
I don't think so. Sounds more like a way to scare monsters.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest