News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
Example Of Grunt's Aiming Leeway 
https://imgur.com/a/DMMkpxO

if you sneakup behind grunt and he shoots, seems there's a 60d arc where it's considered "pointing the gun at you"

This also applies to enforcers and such

trying to reduce this to 5d or less 
^It's FacingIdeal In AI.qc 
delta 
Bug Where Monster Turns Into Solid BSP But Is Still Alive 
I was following one of the tutorials to add strafing to monsters,and i think it might have caused this bug - but i am not familiar with

nothing looks wrong?

have any ideas?

if it helps i vaguely remember reading that if a fiend kills a nuclear box, it took becomes treated as BSP event though it's still alive? 
Nvm I Found The Cuase, It's FoundTarget ... I Can't See What's Wrong? 
void () FoundTarget = //causes invincible bug??
{
local entity head; //new
local float alertRadius; //new

if ( (self.enemy.flags & FL_MONSTER) || (self.enemy.classname == "player") || (self.enemy.classname == "hologram") || (self.enemy.classname == "cbot") || (self.enemy.classname == "CBot_Create")) //new
{
// let other monsters see this monster for a while
sight_entity = self;
sight_entity_time = time;
}
self.show_hostile = time + 2.00; // was 1 wake up other monsters
alertRadius = 512; // Large radius for alert spread (default was usually 1000)?


// Alert all monsters in radius
head = findradius(self.origin, alertRadius);
while(head)
{
if (head.flags & FL_MONSTER)
{
if (head != self) // Don't alert self
{
// Make other monsters aggressive
head.show_hostile = time + 2;
head.enemy = self.enemy;
head.think = head.th_run;
head.nextthink = time + random() * 0.5; // Stagger response times

// Chance to alert even more distant monsters
//if (random() < 0.3) // 30% chance
// {
// head.noise_time = time + 2; // Make noise to attract others
// }
}
}
head = head.chain;
}
//end new


SightSound ();
HuntTarget ();
}; 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.