Enemy ignores you unless shot?
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 ..
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()
And then in the entity:Code: Select all
if (client == self.enemy) return FALSE; if (self.peaceful) // <---------------------- ADDED return FALSE; // <---------------------- ADDED if (client.flags & FL_NOTARGET) return FALSE;
{
"classname" "monster_army"
"origin" "0 576 24"
"angle" "0"
"peaceful" "1" // <------------------------- added
}
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 ..
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;
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 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)
Re: Enemy ignores you unless shot?
You forgot to code the "unless you attack him" part.Baker wrote: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:
[...]
IIRC I've coded this as a feature in the Cheats Menu of my JoyMenu mod.
Re: Enemy ignores you unless shot?
in combat.qc, T_Damagemankrip 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.
Code: Select all
if ( (self.flags & FL_MONSTER) && attacker != world)
{
if (self.classname == "monster_army")
self.peaceful = FALSE;
Re: Enemy ignores you unless shot?
IT_BADGE would have similarities to invisibility power up?
Re: Enemy ignores you unless shot?
I don't think so. Sounds more like a way to scare monsters.qbism wrote:IT_BADGE would have similarities to invisibility power up?